. */ namespace Doctrine\ORM\Cache; /** * Defines entity collection roles to be stored in the cache region. * * @since 2.5 * @author Fabio B. Silva */ class CollectionCacheKey extends CacheKey { /** * @var array */ public $ownerIdentifier; /** * @var string */ public $entityClass; /** * @var string */ public $association; /** * @param string $entityClass The entity class. * @param string $association The field name that represents the association. * @param array $ownerIdentifier The identifier of the owning entity. */ public function __construct($entityClass, $association, array $ownerIdentifier) { ksort($ownerIdentifier); $this->entityClass = $entityClass; $this->association = $association; $this->ownerIdentifier = $ownerIdentifier; $this->hash = str_replace('\\', '.', strtolower($entityClass)) . '_' . implode(' ', $ownerIdentifier) . '__' . $association; } }