PHP Class OEModule\PASAPI\controllers\V1Controller

Inheritance: extends CController
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство Type Description
$PARTIAL_RECORD_HEADER
$UPDATE_ONLY_HEADER

Protected Properties

Свойство Type Description
$output_format output format defaults to xml
$resources
$supported_formats
$version

Méthodes publiques

Méthode Description
actionDelete ( $resource_type, $id )
actionUpdate ( $resource_type, $id )
beforeAction ( CAction $action ) : boolean
createAction ( string $actionID ) : CAction | CInlineAction This overrides the default behaviour for supported resources by pushing the resource into the GET parameter and updating the actionID.
expectedParametersForAction ( $action ) Simple wrapper to encapsulate the arguments required for any of the API actions.
getPartialRecord ( ) : boolean Whether the request is a partial record which only sets the fields that are provided on the given record.
getResourceModel ( $resource_type )
getUpdateOnly ( ) : boolean Whether the request is an "updateOnly" request.
invalidActionParams ( CAction $action )

Méthodes protégées

Méthode Description
getContentType ( ) : string
sendErrorResponse ( $status, $messages = [] )
sendResponse ( $status = 200, $body = '' )
sendSuccessResponse ( $status, $response )

Method Details

actionDelete() public méthode

public actionDelete ( $resource_type, $id )

actionUpdate() public méthode

public actionUpdate ( $resource_type, $id )
$resource_type
$id

beforeAction() public méthode

public beforeAction ( CAction $action ) : boolean
$action CAction
Résultat boolean

createAction() public méthode

This is necessary because there's no way of pushing the appropriate pattern to the top of the URLManager config, so this captures calls where the id doesn't contain non-numerics.
public createAction ( string $actionID ) : CAction | CInlineAction
$actionID string
Résultat CAction | CInlineAction

expectedParametersForAction() public méthode

Simple wrapper to encapsulate the arguments required for any of the API actions.
public expectedParametersForAction ( $action )

getContentType() protected méthode

protected getContentType ( ) : string
Résultat string

getPartialRecord() public méthode

Whether the request is a partial record which only sets the fields that are provided on the given record.
public getPartialRecord ( ) : boolean
Résultat boolean

getResourceModel() public méthode

public getResourceModel ( $resource_type )

getUpdateOnly() public méthode

Whether the request is an "updateOnly" request.
public getUpdateOnly ( ) : boolean
Résultat boolean

invalidActionParams() public méthode

public invalidActionParams ( CAction $action )
$action CAction

sendErrorResponse() protected méthode

protected sendErrorResponse ( $status, $messages = [] )

sendResponse() protected méthode

protected sendResponse ( $status = 200, $body = '' )

sendSuccessResponse() protected méthode

protected sendSuccessResponse ( $status, $response )

Property Details

$PARTIAL_RECORD_HEADER public_oe static_oe property

public static $PARTIAL_RECORD_HEADER

$UPDATE_ONLY_HEADER public_oe static_oe property

public static $UPDATE_ONLY_HEADER

$output_format protected_oe property

output format defaults to xml
protected $output_format

$resources protected_oe static_oe property

protected static $resources

$supported_formats protected_oe static_oe property

protected static $supported_formats

$version protected_oe static_oe property

protected static $version