AppserverIo\Appserver\PersistenceContainer\PersistenceManager::registerEntityManager PHP Метод

registerEntityManager() публичный Метод

Deploys the entity manager described by the passed XML node.
public registerEntityManager ( AppserverIo\Psr\Application\ApplicationInterface $application, AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnitNode ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
$persistenceUnitNode AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface The XML node that describes the entity manager
Результат void
    public function registerEntityManager(ApplicationInterface $application, PersistenceUnitNodeInterface $persistenceUnitNode)
    {
        // initialize the the entity manager instance
        $this->entityManagers[$lookupName = $persistenceUnitNode->getName()] = $persistenceUnitNode;
        // bind the callback for the entity manager instance to the
        // naming directory => necessary for DI provider
        $application->getNamingDirectory()->bind(sprintf('php:global/%s/%s', $application->getUniqueName(), $lookupName), array(&$this, 'lookup'), array($lookupName));
    }