PHP Class ZF\Apigility\Admin\Model\ModuleResource

Inheritance: extends ZF\Rest\AbstractResourceListener
显示文件 Open project: zfcampus/zf-apigility-admin Class Usage Examples

Protected Properties

Property Type Description
$modulePath string
$modulePathSpec ModulePathSpec
$modules ModuleModel

Public Methods

Method Description
__construct ( ModuleModel $modules, ModulePathSpec $pathSpec )
create ( array | object $data ) : ModuleEntity Create a new API-First enabled module
delete ( string $id ) : boolean | ZF\ApiProblem\ApiProblem Delete a module (and, optionally, all code within it)
fetch ( string $id ) : ModuleEntity | ZF\ApiProblem\ApiProblem Fetch module metadata
fetchAll ( array $params = [] ) : array Fetch metadata for all API-First enabled modules
setModulePath ( string $path ) Set path to use when creating new modules

Method Details

__construct() public method

public __construct ( ModuleModel $modules, ModulePathSpec $pathSpec )
$modules ModuleModel
$pathSpec ModulePathSpec

create() public method

Create a new API-First enabled module
public create ( array | object $data ) : ModuleEntity
$data array | object
return ModuleEntity

delete() public method

Delete a module (and, optionally, all code within it)
public delete ( string $id ) : boolean | ZF\ApiProblem\ApiProblem
$id string
return boolean | ZF\ApiProblem\ApiProblem

fetch() public method

Fetch module metadata
public fetch ( string $id ) : ModuleEntity | ZF\ApiProblem\ApiProblem
$id string
return ModuleEntity | ZF\ApiProblem\ApiProblem

fetchAll() public method

Fetch metadata for all API-First enabled modules
public fetchAll ( array $params = [] ) : array
$params array
return array

setModulePath() public method

Set path to use when creating new modules
public setModulePath ( string $path )
$path string

Property Details

$modulePath protected_oe property

protected string $modulePath
return string

$modulePathSpec protected_oe property

protected ModulePathSpec,ZF\Apigility\Admin\Model $modulePathSpec
return ModulePathSpec

$modules protected_oe property

protected ModuleModel,ZF\Apigility\Admin\Model $modules
return ModuleModel