PHP Class ZF\Apigility\Admin\Model\RestServiceResource

Inheritance: extends ZF\Rest\AbstractResourceListener
ファイルを表示 Open project: zfcampus/zf-apigility-admin Class Usage Examples

Protected Properties

Property Type Description
$documentationModel DocumentationModel
$inputFilterModel InputFilterModel
$model RestServiceModel
$moduleName string
$restFactory RestServiceModelFactory

Public Methods

Method Description
__construct ( RestServiceModelFactory $restFactory, InputFilterModel $inputFilterModel, DocumentationModel $documentationModel )
create ( array | object $data ) : RestServiceEntity | ZF\ApiProblem\ApiProblem Create a new REST service
delete ( mixed $id ) : boolean Delete a service
fetch ( string $id ) : RestServiceEntity | ZF\ApiProblem\ApiProblem Fetch REST metadata
fetchAll ( array $params = [] ) : RestServiceEntity[] Fetch metadata for all REST services
getModel ( string $type = RestServiceModelFactory::TYPE_DEFAULT ) : RestServiceModel
getModuleName ( ) : string
patch ( string $id, object | array $data ) : ZF\ApiProblem\ApiProblem | RestServiceEntity Update an existing REST service

Protected Methods

Method Description
injectDocumentation ( RestServiceEntity $service )
injectInputFilters ( RestServiceEntity $service ) Inject the input filters collection, if any, as an embedded collection

Method Details

__construct() public method

public __construct ( RestServiceModelFactory $restFactory, InputFilterModel $inputFilterModel, DocumentationModel $documentationModel )
$restFactory RestServiceModelFactory
$inputFilterModel InputFilterModel
$documentationModel DocumentationModel

create() public method

Create a new REST service
public create ( array | object $data ) : RestServiceEntity | ZF\ApiProblem\ApiProblem
$data array | object
return RestServiceEntity | ZF\ApiProblem\ApiProblem

delete() public method

Delete a service
public delete ( mixed $id ) : boolean
$id mixed
return boolean

fetch() public method

Fetch REST metadata
public fetch ( string $id ) : RestServiceEntity | ZF\ApiProblem\ApiProblem
$id string
return RestServiceEntity | ZF\ApiProblem\ApiProblem

fetchAll() public method

Fetch metadata for all REST services
public fetchAll ( array $params = [] ) : RestServiceEntity[]
$params array
return RestServiceEntity[]

getModel() public method

public getModel ( string $type = RestServiceModelFactory::TYPE_DEFAULT ) : RestServiceModel
$type string One of the RestServiceModelFactory::TYPE_* constants; defaults to RestServiceModelFactory::TYPE_DEFAULT.
return RestServiceModel

getModuleName() public method

public getModuleName ( ) : string
return string

injectDocumentation() protected method

protected injectDocumentation ( RestServiceEntity $service )
$service RestServiceEntity

injectInputFilters() protected method

Inject the input filters collection, if any, as an embedded collection
protected injectInputFilters ( RestServiceEntity $service )
$service RestServiceEntity

patch() public method

Update an existing REST service
public patch ( string $id, object | array $data ) : ZF\ApiProblem\ApiProblem | RestServiceEntity
$id string
$data object | array
return ZF\ApiProblem\ApiProblem | RestServiceEntity

Property Details

$documentationModel protected_oe property

protected DocumentationModel,ZF\Apigility\Admin\Model $documentationModel
return DocumentationModel

$inputFilterModel protected_oe property

protected InputFilterModel,ZF\Apigility\Admin\Model $inputFilterModel
return InputFilterModel

$model protected_oe property

protected RestServiceModel,ZF\Apigility\Admin\Model $model
return RestServiceModel

$moduleName protected_oe property

protected string $moduleName
return string

$restFactory protected_oe property

protected RestServiceModelFactory,ZF\Apigility\Admin\Model $restFactory
return RestServiceModelFactory