PHP Class ZF\Apigility\Admin\Model\InputFilterModel

显示文件 Open project: zfcampus/zf-apigility-admin Class Usage Examples

Protected Properties

Property Type Description
$configFactory ZF\Configuration\ResourceFactory

Public Methods

Method Description
__construct ( ZF\Configuration\ResourceFactory $configFactory ) $validatorPlugins should typically be an instance of Zend\Validator\ValidatorPluginManager.
controllerExists ( string $module, string $controller ) : boolean Check if a module and controller exists
fetch ( string $module, string $controller, string $inputFilterName = null ) : false | array | InputFilterEntity Get the validators of a specific module and controller
moduleExists ( string $module ) : boolean Check if the module exists
remove ( string $module, string $controller, string $inputname ) : boolean Remove the named input
update ( string $module, string $controller, array $inputFilter ) : false | InputFilterEntity Update a specific controller with a new inputfilter (validator)

Protected Methods

Method Description
addInputFilter ( string $module, string $controller, array $inputFilter, string $validatorName = null ) : array | boolean Add input filter
generateValidatorName ( string $controller ) : string Generates the validator name based on controller name
getCollectionType ( string $controller ) : string Determine the collection class to use
getEntityType ( string $controller ) : string Determine the entity class to use
getInputFilter ( string $module, string $controller, string $inputFilterName = null ) : false | InputFilterCollection | InputFilterEntity Get input filter of a module and controller
removeInputFilter ( string $module, string $controller, string $inputFilterName ) : boolean Remove input filter

Method Details

__construct() public method

$validatorPlugins should typically be an instance of Zend\Validator\ValidatorPluginManager.
public __construct ( ZF\Configuration\ResourceFactory $configFactory )
$configFactory ZF\Configuration\ResourceFactory

addInputFilter() protected method

Add input filter
protected addInputFilter ( string $module, string $controller, array $inputFilter, string $validatorName = null ) : array | boolean
$module string
$controller string
$inputFilter array
$validatorName string
return array | boolean

controllerExists() public method

Check if a module and controller exists
public controllerExists ( string $module, string $controller ) : boolean
$module string
$controller string
return boolean

fetch() public method

Get the validators of a specific module and controller
public fetch ( string $module, string $controller, string $inputFilterName = null ) : false | array | InputFilterEntity
$module string
$controller string
$inputFilterName string
return false | array | InputFilterEntity

generateValidatorName() protected method

Generates the validator name based on controller name
protected generateValidatorName ( string $controller ) : string
$controller string
return string

getCollectionType() protected method

Determine the collection class to use
protected getCollectionType ( string $controller ) : string
$controller string
return string

getEntityType() protected method

Determine the entity class to use
protected getEntityType ( string $controller ) : string
$controller string
return string

getInputFilter() protected method

Get input filter of a module and controller
protected getInputFilter ( string $module, string $controller, string $inputFilterName = null ) : false | InputFilterCollection | InputFilterEntity
$module string
$controller string
$inputFilterName string
return false | InputFilterCollection | InputFilterEntity

moduleExists() public method

Check if the module exists
public moduleExists ( string $module ) : boolean
$module string
return boolean

remove() public method

Remove the named input
public remove ( string $module, string $controller, string $inputname ) : boolean
$module string
$controller string
$inputname string
return boolean

removeInputFilter() protected method

Remove input filter
protected removeInputFilter ( string $module, string $controller, string $inputFilterName ) : boolean
$module string
$controller string
$inputFilterName string
return boolean

update() public method

Update a specific controller with a new inputfilter (validator)
public update ( string $module, string $controller, array $inputFilter ) : false | InputFilterEntity
$module string
$controller string
$inputFilter array
return false | InputFilterEntity

Property Details

$configFactory protected_oe property

protected ResourceFactory,ZF\Configuration $configFactory
return ZF\Configuration\ResourceFactory