Interface Psr7Api
This api is most easily provided by accessing the codex entry [psr7].
PURPOSE
An Api Interface is used to declare a family of related classes, and what they are meant to satisfy. It also declares any dependencies, and any interoperability that can occur with it, or any additional apis that it provides.
This information is used internally to validate the execution plan.
This information can be indexed by checking the Codex
USAGE
Effective useage of this interface construct without collisions requires that these interfaces ONLY BE IMPLEMENTED BY CONCRETE, FINAL CLASSES
The traits and abstractions of this system are built to honor the considerations if these without directly implementing them.
Concrete classes can implement them as proof that they honor their api. Internally, the system will FAVOR the object for jobs related to it's DECLARED API when it has MULTIPLE AVAILABLE OPTIONS that all honor a scope.
DECLARE THE API IN THE CONCRETE CLASS if it is not met by inheritance (traits cannot accomplish this for you. You must either declare this yourself or inherit it from one of our base classes).
const API = '\oroboros\core\interfaces\api\adapters\AdapterApi'; //honors the adapter api
Api Interfaces serve as an index of how class type and class scope relate to specific api use cases. This information is available by checking the Codex
- oroboros\core\interfaces\api\psr\Psr7Api implements oroboros\core\interfaces\api\BaseApi
Direct known implementers
oroboros\core\libraries\file\FileUpload
,
oroboros\core\libraries\request\Request
,
oroboros\core\libraries\request\ServerRequest
,
oroboros\core\libraries\response\Response
,
oroboros\core\libraries\stream\Message
,
oroboros\core\libraries\stream\Stream
,
oroboros\core\libraries\uri\Uri
Package: oroboros\core\psr7
Category: api-interfaces
License: The MIT License (MIT)
Author: Brian Dayhoff brian@mopsyd.me
Version: 0.2.4
Since: 0.2.4-alpha
See:
\oroboros\core\codex\Codex
Which can also be done by any class using the codex trait
See:
\oroboros\core\traits\codex\CodexTrait
Or by extending the abstract
See:
\oroboros\core\abstracts\codex\Codex
CONSIDERATIONS
These interfaces DO enforce methods
,for objects to report their api. This condition can be satisfied by including the api trait in your class. Most traits use this one
,so it is likely already available if you are implementing any other trait.
See:
\oroboros\core\traits\api\ApiTrait
These interfaces DO declare numerous constants. There is a low probability of constant collision with external codebases. If this causes an issue
,wrap the object that implements the api in one that doesn't
,and use a pass-through to obtain it's values.
There is a trait that can accomplish this strict enumeration based off of any interface attached to a class that uses it
,which can also filter results by prefix or suffix of the constant name. It's super handy for indexing these in any class that uses them.
See:
\oroboros\core\traits\libraries\enum\EnumTrait
There are also sets of provided defaults under the concrete namespace
See: \oroboros\core\libraries\enum
Link: bitbucket.org/oroborosframework/oroboros-core/wiki/development/api/api_interface.md
Satisfies: \oroboros\core\interfaces\api\ClassTypeApi::CLASS_TYPE_API_VALID
Located at core/interfaces/api/psr/Psr7Api.php
Constants summary
string |
API_TYPE
Designates the type of this Api Interface, and what realm of responsibilities it is classified as. |
#
'standards'
|
string |
API_SCOPE
Determines the focused goal within the api type. The Api Scope reveals the underlying goal of this specific Api Interface, and what the specific purpose of this collection of classes, traits, and interfaces is meant to collectively accomplish. |
#
'interoperability'
|
string |
API_PARENT_NAMESPACE
Designates a parent package or namespace that this Api adheres to. This value should be false if no such parent exists, but this constant should still be declared. |
#
'\\Psr\\Http\\Message'
|
string |
API_CODEX
Designates the codex index for this Api, which can be used to reference this collection of classes, traits, and interfaces as a related family working toward a specific goal. |
#
'psr7'
|
string |
STREAM_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\StreamInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\stream\\Stream'
|
string |
STREAM_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\StreamInterface. This class may be extended to satisfy the requirements of the Psr-7 StreamInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\stream\\AbstractStream'
|
string |
STREAM_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\StreamInterface. This interface extends \Psr\Http\Message\StreamInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\stream\\StreamContract'
|
string |
STREAM_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\stream\StreamContract. |
#
'\\oroboros\\core\\traits\\libraries\\stream\\StreamTrait'
|
string |
URI_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\UriInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\uri\\Uri'
|
string |
URI_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\UriInterface. This class may be extended to satisfy the requirements of the Psr-7 UriInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\uri\\AbstractUri'
|
string |
URI_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\UriInterface. This interface extends \Psr\Http\Message\UriInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\uri\\UriContract'
|
string |
URI_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\uri\UriContract. |
#
'\\oroboros\\core\\traits\\libraries\\uri\\UriTrait'
|
string |
UPLOADEDFILE_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\UploadedFileInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\file\\FileUpload'
|
string |
UPLOADEDFILE_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\UploadedFileInterface. This class may be extended to satisfy the requirements of the Psr-7 UriInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\file\\AbstractFileUpload'
|
string |
UPLOADEDFILE_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\UploadedFileInterface. This interface extends \Psr\Http\Message\UploadedFileInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\file\\UploadedFileContract'
|
string |
UPLOADEDFILE_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\file\UploadedFileContract. |
#
'\\oroboros\\core\\traits\\libraries\\file\\UploadedFileTrait'
|
string |
MESSAGE_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\UploadedFileInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\stream\\Message'
|
string |
MESSAGE_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\MessageInterface. This class may be extended to satisfy the requirements of the Psr-7 MessageInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\stream\\AbstractMessage'
|
string |
MESSAGE_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\MessageInterface. This interface extends \Psr\Http\Message\MessageInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\stream\\MessageContract'
|
string |
MESSAGE_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\stream\MessageContract. |
#
'\\oroboros\\core\\traits\\libraries\\stream\\MessageTrait'
|
string |
REQUEST_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\MequestInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\request\\Request'
|
string |
REQUEST_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\RequestInterface. This class may be extended to satisfy the requirements of the Psr-7 RequestInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\request\\AbstractRequest'
|
string |
REQUEST_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\RequestInterface. This interface extends \Psr\Http\Message\RequestInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\request\\RequestContract'
|
string |
REQUEST_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\request\RequestContract. |
#
'\\oroboros\\core\\traits\\libraries\\request\\RequestTrait'
|
string |
RESPONSE_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\ResponseInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\response\\Response'
|
string |
RESPONSE_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\ResponseInterface. This class may be extended to satisfy the requirements of the Psr-7 ResponseInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\response\\AbstractResponse'
|
string |
RESPONSE_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\ResponseInterface. This interface extends \Psr\Http\Message\ResponseInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\response\\ResponseContract'
|
string |
RESPONSE_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\file\ResponseContract. |
#
'\\oroboros\\core\\traits\\libraries\\response\\ResponseTrait'
|
string |
SERVERREQUEST_CONCRETE_CLASS
Designates the default class used to satisfy \Psr\Http\Message\ServerRequestInterface. This class may be used directly, and will be used by default within this system where no override substitution is provided. |
#
'\\oroboros\\core\\libraries\\request\\ServerRequest'
|
string |
SERVERREQUEST_ABSTRACT_CLASS
Designates the abstract class used to satisfy \Psr\Http\Message\ServerRequestInterface. This class may be extended to satisfy the requirements of the Psr-7 ServerRequestInterface. |
#
'\\oroboros\\core\\abstracts\\libraries\\request\\AbstractServerRequest'
|
string |
SERVERREQUEST_CONTRACT
Designates the interface contract used to satisfy \Psr\Http\Message\ServerRequestInterface. This interface extends \Psr\Http\Message\ServerRequestInterface, and requires the internal expected methods required to construct a valid and functional instance, within the context of Oroboros Core. |
#
'\\oroboros\\core\\interfaces\\contract\\libraries\\request\\ServerRequestContract'
|
string |
SERVERREQUEST_TRAIT
Designates the trait used to satisfy \oroboros\core\interfaces\contract\libraries\request\ServerRequestContract. |
#
'\\oroboros\\core\\traits\\libraries\\request\\ServerRequestTrait'
|
Constants inherited from oroboros\core\interfaces\api\BaseApi
OROBOROS_DECLARED_API
,
OROBOROS_DECLARED_CLASS_SCOPE
,
OROBOROS_DECLARED_CLASS_TYPE