function __construct(ILogicallySchematic $logicalSchema) { $identifier = $logicalSchema->getIdentifier(); if (!$identifier) { throw new OrmModelIntegrityException('IdentityMapOrmDao is for identifierable entities only'); } if ($identifier->getVisibility()->isNot(OrmPropertyVisibility::FULL)) { throw new OrmModelIntegrityException('identifier property should have FULL access level'); } $this->stubObject = $logicalSchema->getNewEntity(); Assert::isTrue($this->stubObject instanceof IdentifiableOrmEntity, '%s should implement IdentifiableOrmEntity', $logicalSchema->getEntityName()); $this->identifier = $identifier; }