PHP Class Api\V1\Engine\Api

Deprecation:
Inheritance: extends KernelLoader, implements ApplicationInterface
Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property Type Description
$content string

Public Methods

Method Description
display ( ) : Response
initialize ( ) Initializes the entire API; extract class+method from the request, call, and output.
isAuthorized ( ) : boolean Default authentication
isValidRequestMethod ( string $method ) : boolean This is called in backend/modules//engine/api.php to limit certain calls to a given request method.
output ( integer $statusCode, array $data = null ) : boolean Output the return

Private Methods

Method Description
arrayToXML ( mixed &$input, string $key, DOMElement $XML ) Callback-method for elements in the return-array
getHeaderMessage ( $statusCode ) : string Get the relevant HTTP status message
outputJSON ( integer $statusCode, array $data = null ) Output as JSON
outputXML ( integer $statusCode, array $data = null ) Output as XML

Method Details

display() public method

public display ( ) : Response
return Symfony\Component\HttpFoundation\Response

initialize() public method

This method exists because the service container needs to be set before the rest of API functionality gets loaded.
public initialize ( )

isAuthorized() public static method

Default authentication
public static isAuthorized ( ) : boolean
return boolean

isValidRequestMethod() public static method

This is called in backend/modules//engine/api.php to limit certain calls to a given request method.
public static isValidRequestMethod ( string $method ) : boolean
$method string
return boolean

output() public static method

Output the return
public static output ( integer $statusCode, array $data = null ) : boolean
$statusCode integer The status code.
$data array The data to return.
return boolean

Property Details

$content protected_oe static_oe property

protected static string $content
return string