Class Base
Common controller internal methods
Direct known subclasses
Indirect known subclasses
Phramework\JSONAPI\Controller
,
Phramework\JSONAPI\Controller\DELETE
,
Phramework\JSONAPI\Controller\GET
,
Phramework\JSONAPI\Controller\GETById
,
Phramework\JSONAPI\Controller\PATCH
,
Phramework\JSONAPI\Controller\POST
Abstract
Namespace: Phramework\JSONAPI\Controller
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.0.0
Located at Controller/Base.php
Namespace: Phramework\JSONAPI\Controller
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.0.0
Located at Controller/Base.php
Methods summary
protected static
|
|
protected static
|
#
exists( mixed $assert, string $exceptionMessage = 'Resource not found' )
If !assert then a NotFoundException exceptions is thrown. |
protected static
|
#
testUnknownError( mixed $assert, string $exceptionMessage = 'Unknown error' )
If !assert then a Exception exception is thrown. |
public static
boolean
|
|
protected static
string[]
|
#
getRequestInclude( object $parameters, string|null $modelClass = null )
Extract included related resources from parameters |
protected static
object
|
#
getRequestAttributes( object $parameters )
Get request data attributes. The request is expected to have json api structure Like the following example:
|
protected static
object|object[]
|
|
protected static
stdClass
|
|
public static
|
#
checkIfUnsupportedRequestWithId( object|resource $resource )
Throw a Forbidden exception if resource's id is set. * Unsupported request to create a resource with a client-generated ID |