PHP 클래스 ZF\Apigility\DbConnectedResource

상속: extends ZF\Rest\AbstractResourceListener
파일 보기 프로젝트 열기: zfcampus/zf-apigility 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$collectionClass Name of collection class
$identifierName Name of identifier field
$table Zend\Db\TableGateway\TableGatewayInterface

공개 메소드들

메소드 설명
__construct ( Zend\Db\TableGateway\TableGatewayInterface $table, string $identifierName, string $collectionClass )
create ( array | object $data ) : array | object Create a new resource.
delete ( integer | string $id ) : boolean Delete an existing resource.
fetch ( integer | string $id ) : array | object Fetch an existing resource.
fetchAll ( array | object $data = [] ) : Zend\Paginator\Paginator Fetch a paginated set of resources.
patch ( integer | string $id, array | object $data ) : array | object Update an existing resource.
update ( integer | string $id, array | object $data ) : array | object Replace an existing resource.

보호된 메소드들

메소드 설명
retrieveData ( mixed $data ) : array Retrieve data

메소드 상세

__construct() 공개 메소드

public __construct ( Zend\Db\TableGateway\TableGatewayInterface $table, string $identifierName, string $collectionClass )
$table Zend\Db\TableGateway\TableGatewayInterface
$identifierName string
$collectionClass string

create() 공개 메소드

Create a new resource.
public create ( array | object $data ) : array | object
$data array | object Data representing the resource to create.
리턴 array | object Newly created resource.

delete() 공개 메소드

Delete an existing resource.
public delete ( integer | string $id ) : boolean
$id integer | string Identifier of resource.
리턴 boolean

fetch() 공개 메소드

Fetch an existing resource.
public fetch ( integer | string $id ) : array | object
$id integer | string Identifier of resource.
리턴 array | object Resource.

fetchAll() 공개 메소드

Fetch a paginated set of resources.
public fetchAll ( array | object $data = [] ) : Zend\Paginator\Paginator
$data array | object Ignored.
리턴 Zend\Paginator\Paginator

patch() 공개 메소드

Update an existing resource.
public patch ( integer | string $id, array | object $data ) : array | object
$id integer | string Identifier of resource.
$data array | object Data with which to update the resource.
리턴 array | object Updated resource.

retrieveData() 보호된 메소드

Retrieve data from composed input filter, if any; if none, cast the data passed to the method to an array.
protected retrieveData ( mixed $data ) : array
$data mixed
리턴 array

update() 공개 메소드

Replace an existing resource.
public update ( integer | string $id, array | object $data ) : array | object
$id integer | string Identifier of resource.
$data array | object Data with which to replace the resource.
리턴 array | object Updated resource.

프로퍼티 상세

$collectionClass 보호되어 있는 프로퍼티

Name of collection class
protected $collectionClass

$identifierName 보호되어 있는 프로퍼티

Name of identifier field
protected $identifierName

$table 보호되어 있는 프로퍼티

protected TableGatewayInterface,Zend\Db\TableGateway $table
리턴 Zend\Db\TableGateway\TableGatewayInterface