GenericPropertyProvider implements IModelPropertyProvider
A generic property provider.
Simply maps the supplied closures to methods defined in IModelPropertyProvider.
Table of Contents
$init | init fucntion | Closure |
---|---|---|
$getValue | getValue function | Closure |
$setValue | setValue function | Closure |
$validate | validate function | Closure |
$getConfig | getConfig function | Closure |
__construct() | mixed | |
init() | Initialize the model. | void |
getValue() | Retrieve the value of some property | mixed |
setValue() | Sets the value of some property | void |
validate() | Test to see if this model is valid prior to save() | void |
getModelServiceConfig() | Retrieve the configuration used to build this provider | IPropertySvcConfig |
getPropertyConfig() | Get the property config for the main property set | IPropertyConfig |
getSaveFunction() | Retrieve the save function used for saving stuff from the provider. | IRunnable |
Properties
$init
init fucntion
private
Closure
$init
$getValue
getValue function
private
Closure
$getValue
$setValue
setValue function
private
Closure
$setValue
$validate
validate function
private
Closure
$validate
$getConfig
getConfig function
private
Closure
$getConfig
Methods
__construct()
public
__construct(
$init :
Closure
, $getValue :
Closure
, $setValue :
Closure
, $validate :
Closure
, $getConfig :
Closure
, $onSave :
Closure
)
: mixed
Parameters
- $init : Closure
f( IModel ) : void
- $getValue : Closure
f( IModel, mixed, array ) : mixed
- $setValue : Closure
f( IModel, mixed ) : void
- $validate : Closure
f( IModel ) : void throws ValidationException
- $getConfig : Closure
f() : IPropertySvcCfg
- $onSave : Closure
f( IModel $parent ) : IRunnable[]
Return values
mixedinit()
Initialize the model.
public
init(
$model :
IModel
)
: void
Parameters
- $model : IModel
Model instance
getValue()
Retrieve the value of some property
public
getValue(
$model :
IModel
, $value :
mixed
[, $context :
array
= [] ]
)
: mixed
Parameters
- $model : IModel
- $value : mixed
- $context : array = []
Tags
Return values
mixed —value
setValue()
Sets the value of some property
public
setValue(
$model :
IModel
, $value :
mixed
)
: void
Parameters
- $model : IModel
- $value : mixed
property value
Tags
validate()
Test to see if this model is valid prior to save()
public
validate(
$model :
IModel
)
: void
Parameters
- $model : IModel
Tags
getModelServiceConfig()
Retrieve the configuration used to build this provider
public
getModelServiceConfig(
)
: IPropertySvcConfig
Return values
IPropertySvcConfig —config
getPropertyConfig()
Get the property config for the main property set
public
getPropertyConfig(
)
: IPropertyConfig
Return values
IPropertyConfig —config
getSaveFunction()
Retrieve the save function used for saving stuff from the provider.
public
getSaveFunction(
$parent :
IModel
)
: IRunnable
Parameters
- $parent : IModel