Return the persistence manager

@return PersistenceManager
483313
public PersistenceManager getPersistenceManager() {
        if (persistenceManager == null) {
            try {
                persistenceManager = getPresentationManager().newPersistenceManager();
            } catch (Exception ex) {
                getPresentationManager().error(ex);
                throw new ConnectionNotFoundException();
            }
        }
        return persistenceManager;
    }
595782
public function getManager()
    {
        if (!is_object($this->_manager)) {
            $this->_manager = Yii::$app->get($this->_manager);
        }

        return $this->_manager;
    }
534625
public function getPageManager()
    {
        if ($this->pageManager === null) {
            $this->pageManager = new PageManager($this);
        }
        return $this->pageManager;
    }
633659
public function getCommandManager()
	{
	    if ($this->commandManager === null) {
	        $this->commandManager = new CommandManager();
	        $this->commandManager->setServiceLoader($this);
	    }
	     
	    return $this->commandManager;
	}
1020982
private function getPersistence()
    {
        if ($this->persistence === null) {
            $this->persistence = common_persistence_KeyValuePersistence::getPersistence(
                $this->getOption(self::OPTION_PERSISTENCE)
            );
        }
        return $this->persistence;
    }
95430
public function getObjectManager()
    {
        if (!$this->objectManager instanceof ObjectManager) {
            $this->setObjectManager($this->getServiceManager()->get('doctrine.entitymanager.orm_default'));
        }
        return $this->objectManager;
    }
1289916
public function getSchemaManager()
    {
        if ($this->_schemaManager === null) {
            $this->_schemaManager = $this->_driver->getSchemaManager($this);
        }

        return $this->_schemaManager;
    }
1243767
public function getEntityManager()
    {

        // check if we have a valid datasource node
        if ($this->getDatasourceNode() == null) {
            return;
        }

        // prepare the path to the entities
        $absolutePaths = array();
        if ($relativePaths = $this->getStepNode()->getParam(AbstractDatabaseStep::PARAM_PATH_TO_ENTITIES)) {
            foreach (explode(PATH_SEPARATOR, $relativePaths) as $relativePath) {
                $absolutePaths[] = $this->getWebappPath() . DIRECTORY_SEPARATOR . $relativePath;
            }
        }

        // load the database connection parameters
        $connectionParameters = $this->getConnectionParameters();

        // initialize and load the entity manager and the schema tool
        $metadataConfiguration = Setup::createAnnotationMetadataConfiguration($absolutePaths, true, null, null, false);
        return EntityManager::create($connectionParameters, $metadataConfiguration);
    }
1237641
public function getDriverManager(): Interfaces\JavaObject
    {
        if ($this->driverManager === null) {
            $this->driverManager = $this->ba->javaClass('java.sql.DriverManager');
        }

        return $this->driverManager;
    }
436163
protected function getEntityManager()
    {
        if (null === $this->entityManager) {
            $reflectionProperty = new \ReflectionProperty(SQLFilter::class, 'em');
            $reflectionProperty->setAccessible(true);
            $this->entityManager = $reflectionProperty->getValue($this);
        }

        return $this->entityManager;
    }
853753
protected function getSchemaManager()
    {
        if ($this->schemaManager == null) {
            common_Logger::d('init dbal connection to get SchemaMangager');
            $config = new \Doctrine\DBAL\Configuration();
            $params = $this->getDriver()->getParams();
            $connection = \Doctrine\DBAL\DriverManager::getConnection($params, $config);
            $this->schemaManager = $connection->getSchemaManager();
        }
        return $this->schemaManager;
    }
1211392
public function getEntityManager()
    {
        if (isset($this->entityManager) && is_object($this->entityManager)) {
            // 5.8 ->
            return $this->entityManager;
        }
        $pkgID = $this->c->getPackageID();
        if ($pkgID > 0) {
            return Package::getByID($pkgID)->getEntityManager();
        } else {
            return ORM::entityManager('app');
        }
    }
218237
public function getManager(?string $name = null) : ObjectManager
    {
        if ($name === null) {
            $name = $this->defaultManager;
        }

        if (! isset($this->managers[$name])) {
            throw new InvalidArgumentException(
                sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)
            );
        }

        /** @var ObjectManager $objectManager */
        $objectManager = $this->getService($this->managers[$name]);

        return $objectManager;
    }
1057489
private function getClassContentManager()
    {
        $manager = $this->getApplication()
                        ->getContainer()
                        ->get('classcontent.manager')
                        ->setBBUserToken($this->getApplication()->getBBUserToken());

        return $manager;
    }
630477
public function getCallbackManager()
    {
        if (null === $this->callbackManager) {
            $this->callbackManager = new CallbackManager($this->httpClient, $this->messageFactory, $this->serializer);
            $this->callbackManager->setHost($this->host);
        }
        return $this->callbackManager;
    }
679065
public function getDescriptor()
    {
        $entityDescriptor = EntityManager::getInstance()->get($this);
        return Manager::getInstance()->get($entityDescriptor);
    }
1374897
public function getObjectManager(): ObjectManagerInterface
    {
        if (!isset($this->earlyInstances[ObjectManagerInterface::class])) {
            debug_print_backtrace();
            throw new FlowException('The Object Manager is not available at this stage of the bootstrap run.', 1301120788);
        }
        return $this->earlyInstances[ObjectManagerInterface::class];
    }