PHP Класс Controllers\xAPI\DocumentController

Наследование: extends BaseController
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
completeDelete ( mixed $data = null, boolean $singleDelete = false ) : Response Completes deletion of $data.
getIndexData ( $additional = [] )
getShowData ( )

Приватные методы

Метод Описание
checkFormContentType ( string $contentType = '' ) : boolean Determines if $contentType is a form.

Описание методов

__construct() публичный Метод

Construct a new DocumentController.
public __construct ( Locker\Repository\Document\DocumentRepository $document )
$document Locker\Repository\Document\DocumentRepository

checkParams() публичный Метод

Checks and filters $data against $required and $optional parameters.
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
Результат AssocArray Filtered data.

checkTypes() публичный Метод

Check that $value is $expected_types.
public checkTypes ( $name, $value, $expected_types )

completeDelete() защищенный Метод

Completes deletion of $data.
protected completeDelete ( mixed $data = null, boolean $singleDelete = false ) : Response
$data mixed
$singleDelete boolean determines if deleting multiple objects.
Результат Response

destroy() публичный Метод

Deletes a document.
public destroy ( ) : Response
Результат Response

documentResponse() публичный Метод

Generates content response.
public documentResponse ( mixed $data ) : Response
$data mixed used to select the Document.
Результат Response

getAttachedContent() публичный Метод

Retrieves attached file content
public getAttachedContent ( string $name = 'content' ) : Array
$name string Field name
Результат Array

getIndexData() защищенный Метод

protected getIndexData ( $additional = [] )

getPostContent() публичный Метод

Checks for files, then retrieves the stored param.
public getPostContent ( String $name ) : Array
$name String Field name
Результат Array

getShowData() защищенный Метод

protected getShowData ( )

getUpdatedValue() публичный Метод

Checks and gets the updated header.
public getUpdatedValue ( ) : String
Результат String The updated timestamp ISO 8601 formatted.

index() публичный Метод

public index ( )

show() публичный Метод

Returns (GETs) a single document.
public show ( ) : DocumentResponse
Результат DocumentResponse

store() публичный Метод

Creates (POSTs) a new document.
public store ( ) : Response
Результат Response

update() публичный Метод

Creates (PUTs) a new document.
public update ( ) : Response
Результат Response

validateTimestamp() публичный Метод

Validates a $timestamp.
public validateTimestamp ( string $timestamp ) : boolean
$timestamp string
Результат boolean Validity of the timestamp.

Описание свойств

$document защищенное свойство

Defines properties to be set to constructor parameters.
protected $document

$document_type защищенное свойство

Defines properties to be set by sub classes.
protected $document_type

$identifier защищенное свойство

Defines properties to be set by sub classes.
protected $identifier

$lrs защищенное свойство

Defines properties to be set by the constructor.
protected $lrs

$method защищенное свойство

Defines properties to be set by the constructor.
protected $method

$optional защищенное свойство

Defines properties to be set by sub classes.
protected $optional

$params защищенное свойство

Defines properties to be set by the constructor.
protected $params

$required защищенное свойство

Defines properties to be set by sub classes.
protected $required