PHP Class ApiController

Inheritance: extends LoompAction
Show file Open project: openeyes/openeyes Class Usage Examples

Protected Properties

Property Type Description
$general_tags
$output_format
$profile_tags
$security_tags
$xml_error_map

Public Methods

Method Description
actionBadRequest ( )
actionConformance ( ) WhOLE SYSTEM INTERACTIONS
actionCreate ( string $resource_type ) Create resource.
actionDelete ( string $resource_type, string $id ) Delete resource.
actionRead ( string $resource_type, string $id ) Read (view) resource.
actionSearch ( $resource_type ) Search for resource(s).
actionUpdate ( string $resource_type, string $id ) Update resource.
actionVread ( string $resource_type, string $id, string $vid ) Read (view) previous version of resource.
beforeAction ( $action )
handleError ( CErrorEvent $event )
handleException ( CExceptionEvent $event )

Protected Methods

Method Description
getRef ( $resource_type, $id )
parseInput ( )
sendBundle ( services\FhirBundle $bundle )
sendError ( $message, $status = 400, $type )
sendInfo ( $message, $status = 200 )
sendResource ( services\Resource $resource, $status = 200 )
sendResponse ( integer $status, string $body = '' ) Send response.

Private Methods

Method Description
getSearchService ( $resource_type, array &$params )

Method Details

actionBadRequest() public method

public actionBadRequest ( )

actionConformance() public method

WhOLE SYSTEM INTERACTIONS
public actionConformance ( )

actionCreate() public method

Create resource.
public actionCreate ( string $resource_type )
$resource_type string

actionDelete() public method

Delete resource.
public actionDelete ( string $resource_type, string $id )
$resource_type string
$id string

actionRead() public method

Read (view) resource.
public actionRead ( string $resource_type, string $id )
$resource_type string
$id string

actionSearch() public method

Search for resource(s).
public actionSearch ( $resource_type )
$resource_type

actionUpdate() public method

Update resource.
public actionUpdate ( string $resource_type, string $id )
$resource_type string
$id string

actionVread() public method

Current implementation uses timestamp as version ID and only supports the current version
public actionVread ( string $resource_type, string $id, string $vid )
$resource_type string
$id string
$vid string

beforeAction() public method

public beforeAction ( $action )

getRef() protected method

protected getRef ( $resource_type, $id )

handleError() public method

public handleError ( CErrorEvent $event )
$event CErrorEvent

handleException() public method

public handleException ( CExceptionEvent $event )
$event CExceptionEvent

parseInput() protected method

protected parseInput ( )

sendBundle() protected method

protected sendBundle ( services\FhirBundle $bundle )
$bundle services\FhirBundle

sendError() protected method

protected sendError ( $message, $status = 400, $type )

sendInfo() protected method

protected sendInfo ( $message, $status = 200 )

sendResource() protected method

protected sendResource ( services\Resource $resource, $status = 200 )
$resource services\Resource

sendResponse() protected method

Send response.
protected sendResponse ( integer $status, string $body = '' )
$status integer
$body string

Property Details

$general_tags protected property

protected $general_tags

$output_format protected property

protected $output_format

$profile_tags protected property

protected $profile_tags

$security_tags protected property

protected $security_tags

$xml_error_map protected static property

protected static $xml_error_map