PHP Class Inspekt\AccessorAbstract

Author: Ed Finkler
Datei anzeigen Open project: funkatron/inspekt

Protected Properties

Property Type Description
$cage string the cage object this is attached to, provided in the constructor

Public Methods

Method Description
__construct ( Cage $cage, array $args = null ) constructor
run ( string $key = null ) : mixed This executes the accessor on the key, either passed as the only argument, or the first value in $this->args;

Protected Methods

Method Description
getValue ( string $key ) : mixed Retrieves a value from the cage
inspekt ( $val ) : mixed
walkArray ( mixed $input ) : mixed If an array is the value of the given key, this method walks the array recursively, applying $this->inspekt on any non-array values

Method Details

__construct() public method

constructor
Author: Ed Finkler
public __construct ( Cage $cage, array $args = null )
$cage Cage
$args array optional

getValue() protected method

Retrieves a value from the cage
Author: Ed Finkler
protected getValue ( string $key ) : mixed
$key string
return mixed

inspekt() abstract protected method

abstract protected inspekt ( $val ) : mixed
$val
return mixed

run() public method

This executes the accessor on the key, either passed as the only argument, or the first value in $this->args;
Author: Ed Finkler
public run ( string $key = null ) : mixed
$key string
return mixed

walkArray() protected method

If an array is the value of the given key, this method walks the array recursively, applying $this->inspekt on any non-array values
Author: Ed Finkler
protected walkArray ( mixed $input ) : mixed
$input mixed
return mixed

Property Details

$cage protected_oe property

the cage object this is attached to, provided in the constructor
protected string $cage
return string