Property | Type | Description | |
---|---|---|---|
$document | Defines properties to be set to constructor parameters. | ||
$document_type | Defines properties to be set by sub classes. | ||
$identifier | Defines properties to be set by sub classes. | ||
$lrs | Defines properties to be set by the constructor. | ||
$method | Defines properties to be set by the constructor. | ||
$optional | Defines properties to be set by sub classes. | ||
$params | Defines properties to be set by the constructor. | ||
$required | Defines properties to be set by sub classes. |
Method | Description | |
---|---|---|
__construct ( Locker\Repository\Document\DocumentRepository $document ) | Construct a new DocumentController. | |
checkParams ( AssocArray[Key=>Type] $required = [], AssocArray[Key=>Type] $optional = [], mixed $data = null ) : AssocArray | Checks and filters $data against $required and $optional parameters. | |
checkTypes ( $name, $value, $expected_types ) | Check that $value is $expected_types. | |
destroy ( ) : Response | Deletes a document. | |
documentResponse ( mixed $data ) : Response | Generates content response. | |
getAttachedContent ( string $name = 'content' ) : Array | Retrieves attached file content | |
getPostContent ( String $name ) : Array | Checks for files, then retrieves the stored param. | |
getUpdatedValue ( ) : String | Checks and gets the updated header. | |
index ( ) | ||
show ( ) : DocumentResponse | Returns (GETs) a single document. | |
store ( ) : Response | Creates (POSTs) a new document. | |
update ( ) : Response | Creates (PUTs) a new document. | |
validateTimestamp ( string $timestamp ) : boolean | Validates a $timestamp. |
Method | Description | |
---|---|---|
completeDelete ( mixed $data = null, boolean $singleDelete = false ) : Response | Completes deletion of $data. | |
getIndexData ( $additional = [] ) | ||
getShowData ( ) |
Method | Description | |
---|---|---|
checkFormContentType ( string $contentType = '' ) : boolean | Determines if $contentType is a form. |
public __construct ( Locker\Repository\Document\DocumentRepository $document ) | ||
$document | Locker\Repository\Document\DocumentRepository |
public checkParams ( AssocArray[Key=>Type] $required = [], AssocArray[Key=>Type] $optional = [], mixed $data = null ) : AssocArray | ||
$required | AssocArray[Key=>Type] | |
$optional | AssocArray[Key=>Type] | |
$data | mixed | Data |
return | AssocArray | Filtered data. |
public checkTypes ( $name, $value, $expected_types ) |
protected completeDelete ( mixed $data = null, boolean $singleDelete = false ) : Response | ||
$data | mixed | |
$singleDelete | boolean | determines if deleting multiple objects. |
return | Response |
public documentResponse ( mixed $data ) : Response | ||
$data | mixed | used to select the Document. |
return | Response |
public getAttachedContent ( string $name = 'content' ) : Array | ||
$name | string | Field name |
return | Array |
public getPostContent ( String $name ) : Array | ||
$name | String | Field name |
return | Array |
public getUpdatedValue ( ) : String | ||
return | String | The updated timestamp ISO 8601 formatted. |
public show ( ) : DocumentResponse | ||
return | DocumentResponse |
public validateTimestamp ( string $timestamp ) : boolean | ||
$timestamp | string | |
return | boolean | Validity of the timestamp. |
protected $document |
protected $document_type |
protected $identifier |