PHP 클래스 Controllers\xAPI\DocumentController

상속: extends BaseController
파일 보기 프로젝트 열기: learninglocker/learninglocker 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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