Documentation

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

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
mixed

getValue()

Retrieve the value of some property

public getValue( $model : IModel , $value : mixed [, $context : array = [] ] ) : mixed
Parameters
$model : IModel
$value : mixed
$context : array = []
Tags
throws
InvalidArgumentException

if the property is invalid

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
throws
InvalidArgumentException

if the property is invalid

Search results