PHP Class Hive_Container, hive

Author: Woody Gilk ([email protected])
Inheritance: extends ArrayObject
Mostra file Open project: shadowhand/hive Class Usage Examples

Protected Properties

Property Type Description
$__owner owner of this container
$__relation relationship of the owner to this container
$__removed removed models

Public Methods

Method Description
__construct ( array $data = [] ) : void Preloads the container.
as_array ( ) : array Return the container contents as an associative array.
changed ( )
factory ( Hive $owner = NULL, Hive_Relation $relation = NULL ) : Hive_Container Create a new container.
offsetSet ( $key, $model )
offsetUnset ( $key ) : void Store the removed element, so that it can be managed later.
owner ( Hive $owner = NULL )
relation ( Hive_Relation $relation = NULL )
values ( array $values = NULL )

Method Details

__construct() public method

$containter = new Hive_Container;
public __construct ( array $data = [] ) : void
$data array
return void

as_array() public method

$array = $container->as_array();
public as_array ( ) : array
return array

changed() public method

public changed ( )

factory() public static method

$container = Hive_Container::factory($owner, $relation);
public static factory ( Hive $owner = NULL, Hive_Relation $relation = NULL ) : Hive_Container
$owner Hive
$relation Hive_Relation
return Hive_Container

offsetSet() public method

public offsetSet ( $key, $model )

offsetUnset() public method

unset($container['foo']);
public offsetUnset ( $key ) : void
return void

owner() public method

public owner ( Hive $owner = NULL )
$owner Hive

relation() public method

public relation ( Hive_Relation $relation = NULL )
$relation Hive_Relation

values() public method

public values ( array $values = NULL )
$values array

Property Details

$__owner protected_oe property

owner of this container
protected $__owner

$__relation protected_oe property

relationship of the owner to this container
protected $__relation

$__removed protected_oe property

removed models
protected $__removed