Wiki

Clone wiki

Oroboros Core / development / api / api_interface

Oroboros Core

#Oroboros Core


Current Release: 0.2.4

Author: Brian Dayhoff

Copyright: Copyright 2016, all rights reserved.

License: MIT


    #Oroboros Core Api Interface Specifications#

    Api Interfaces declare a family of related classes in a package, in a way that prevents them from needing to declare a common interface directly, though they MAY opt to implement the Api Interface in their concrete representation as proof of concept.

    Api Interfaces are used as an index of a package, and declare what roles are required to be fulfilled to honor the package, what prerequisites must be made available, what scope of work the package accomplishes, and what other apis the package classes should be capable of fulfilling by extension.

    These are used by the Codex to resolve ambiguity between two objects that both honor a Contract, to make a determination if one of them is more suited in the immediate sense or not.

    \oroboros\core\interfaces\api\BaseApi

    ##Specifications##

    Contract interfaces follow the following specifications:

    • They MUST inherit \oroboros\core\interfaces\contract\BaseContract
    • They MAY additionally inherit other required compatibility interfaces (eg: \Psr\Log\LoggerAwareInterface)
    • They MAY extend zero or more other Contract Interfaces
    • They MUST NOT extend any Enumerated Api Interfaces (which extend from: \oroboros\core\interfaces\enumerated\BaseEnumeratedApi as their parent),
    • They MUST NOT extend any Api Interface (which extend from: \oroboros\core\interfaces\api\BaseApi as their parent)
    • They MUST NOT directly enforce or declare class constants (however they MAY inherit them from extension of expected external interfaces, if it is unavoidable).

    Updated