PHP Class Doctrine\ODM\OrientDB\Mapper\ClusterMap

Creates and caches a map of classes and clusters in the database, which makes it possible to tell the proxy class of an entity just by it's rid.
Author: Tamás Millián ([email protected])
Show file Open project: doctrine/orientdb-odm Class Usage Examples

Protected Properties

Property Type Description
$binding
$cache
$databaseName
$map

Public Methods

Method Description
__construct ( Doctrine\OrientDB\Binding\BindingInterface $binding, Doctrine\Common\Cache\Cache $cache )
generateMap ( ) Creates the mapping of classes to clusters, it is public so it can be called forcibly which will be handy if it's done in some cache-warmup task.
identifyClass ( Rid $rid ) : string Tries to identify the class of an rid by matching it against the clusters in the database

Protected Methods

Method Description
getCacheKey ( )
getMap ( ) : array Loads/generates the map in case it's needed.
load ( ) Tries to load the map from cache, otherwise generates it.

Method Details

__construct() public method

public __construct ( Doctrine\OrientDB\Binding\BindingInterface $binding, Doctrine\Common\Cache\Cache $cache )
$binding Doctrine\OrientDB\Binding\BindingInterface
$cache Doctrine\Common\Cache\Cache

generateMap() public method

Creates the mapping of classes to clusters, it is public so it can be called forcibly which will be handy if it's done in some cache-warmup task.
public generateMap ( )

getCacheKey() protected method

protected getCacheKey ( )

getMap() protected method

Loads/generates the map in case it's needed.
protected getMap ( ) : array
return array

identifyClass() public method

Tries to identify the class of an rid by matching it against the clusters in the database
public identifyClass ( Rid $rid ) : string
$rid Doctrine\ODM\OrientDB\Types\Rid
return string

load() protected method

Tries to load the map from cache, otherwise generates it.
protected load ( )

Property Details

$binding protected property

protected $binding

$cache protected property

protected $cache

$databaseName protected property

protected $databaseName

$map protected property

protected $map