PHP Class Storm\Core\Containers\Map

Author: Elliot Levin ([email protected])
Inheritance: implements IteratorAggregate, implements ArrayAccess
Show file Open project: timetoogo/penumbra Class Usage Examples

Public Methods

Method Description
From ( array $Instances, array $ToInstances ) : Map Creates a new map from two arrays of instances.
GetInstances ( ) : array
GetToInstances ( ) : array
Map ( object $Instance, object $ToInstance ) : Map Maps an instance to another instance. Previous mappings for either instances are replaced.
Unmap ( object $Instance ) : Map Removes any mapping of the supplied instance.
__construct ( )
getIterator ( )
offsetExists ( $Instance )
offsetGet ( $Instance )
offsetSet ( $Instance, $ToInstance )
offsetUnset ( $Instance )

Private Methods

Method Description
Detach ( $Instance, $ToInstance )
MapNew ( $Instance, $ToInstance )

Method Details

From() public static method

Creates a new map from two arrays of instances.
public static From ( array $Instances, array $ToInstances ) : Map
$Instances array The array of objects to map.
$ToInstances array The array of object to map to.
return Map The created map

GetInstances() public method

public GetInstances ( ) : array
return array

GetToInstances() public method

public GetToInstances ( ) : array
return array

Map() public method

Maps an instance to another instance. Previous mappings for either instances are replaced.
public Map ( object $Instance, object $ToInstance ) : Map
$Instance object
$ToInstance object
return Map

Unmap() public method

Removes any mapping of the supplied instance.
public Unmap ( object $Instance ) : Map
$Instance object The instance to unmap.
return Map

__construct() public method

public __construct ( )

getIterator() public method

public getIterator ( )

offsetExists() public method

public offsetExists ( $Instance )

offsetGet() public method

public offsetGet ( $Instance )

offsetSet() public method

public offsetSet ( $Instance, $ToInstance )

offsetUnset() public method

public offsetUnset ( $Instance )