Creates a RecoveryManager object instance and associates it with this FailureScopeController
The recovery manager handles recovery processing on behalf of the managed failure scope.

@return String The new RecoveryManager instance.
501756
@Override
    public void createRecoveryManager(RecoveryAgent agent, RecoveryLog tranLog, RecoveryLog xaLog, RecoveryLog recoverXaLog, byte[] defaultApplId, int defaultEpoch) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "createRecoveryManager", new Object[] { this, agent, tranLog, xaLog, recoverXaLog, defaultApplId, defaultEpoch });

        _tranLog = tranLog;
        _xaLog = xaLog;
        _recoverXaLog = recoverXaLog;
        _recoveryManager = new EmbeddableRecoveryManager(this, agent, tranLog, xaLog, recoverXaLog, defaultApplId, defaultEpoch);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "createRecoveryManager", _recoveryManager);
    }
1044188
public function getSetManager()
    {
        if (!isset($this->setManager)) {
            $this->setManager = new ExpressSetManager($this->expressEntity, $this->entityManager);
        }

        return $this->setManager;
    }
270899
public function getErrorProcessor(): MiddlewareInterface
    {
        if (is_null($this->errorProcessor)) {
            if (method_exists($this, 'resolve')) {
                $this->setErrorProcessor($this->resolve(Middleware::class));
            } else {
                $this->setErrorProcessor(new Middleware());
            }
        }

        return $this->errorProcessor;
    }
174034
public static function setupExceptionHandling() {
        $previous = set_exception_handler(self::$exceptionHandler=__CLASS__.'::handleException');

        /**
         * Detect entering of the script's shutdown phase to be capable of handling destructor exceptions during shutdown
         * differently and avoid otherwise fatal errors. Should be the very first function on the shutdown function stack.
         *
         * @see  http://php.net/manual/en/language.oop5.decon.php
         * @see  ErrorHandler::handleDestructorException()
         */
        register_shutdown_function(function() {
            self::$inShutdown = true;
        });
        return $previous;
    }
723097
private static function buildRetryDecider()
    {
        return function (
            $retries,
            \GuzzleHttp\Psr7\Request $request,
            \GuzzleHttp\Psr7\Response $response = null,
            \GuzzleHttp\Exception\RequestException $exception = null
        ) {
            if ($retries >= self::MAX_AUTOMATIC_TIMEOUT_RETRIES) {
                return false;
            }

            if (!self::isConnectionError($exception) && !self::isRetryableServerError($response)) {
                return false;
            }

            if ($request->getMethod() == "GET" || $request->getMethod() == "PUT") {
                return true;
            }

            $path = $request->getUri()->getPath();

            if ($request->getMethod() == "POST") {
                if (!preg_match(self::ACTIONS_PATH_REGEX, $path)) {
                    return true;
                }
            }

            return false;
        };
    }
810918
public function getModuleManager() {
		if ($this->moduleManager === null) {
			$this->moduleManager = new ModuleManager($this);
		}

		return $this->moduleManager;
	}
100995
protected function makeScope()
    {
        $resource = $this->makeResource();

        if (isset($this->serializer)) {
            $this->fractal->setSerializer($this->serializer);
        }

        return $this->fractal->createData($resource);
    }
1354164
private function routeManager()
    {
        if (!isset($this->routeManager)) {
            $config = $this->config();
            $routesConfig = (isset($config['routes']) ? $config['routes'] : [] );

            $this->routeManager = new RouteManager([
                'config' => $routesConfig,
                'app'    => $this
            ]);
        }

        return $this->routeManager;
    }
777001
public function getSecurityManager()
    {
        if(array_key_exists(self::SECURITY_MANAGER, $this->_map))
            return $this->_map[self::SECURITY_MANAGER];
        return null;

    }
1129902
public function getMetadataReaderManager()
    {
        if ($this->metadataReaderManager) {
            return $this->metadataReaderManager;
        }

        try {
            $sl = $this->getServiceLocator();
            /** @var ModuleOptions $moduleOptions */
            $moduleOptions = $sl->get(ModuleOptions::class);

            $className = $moduleOptions->getMetadataReaderManagerClassName();

            $r = new \ReflectionClass($className);
            $instance = $r->newInstance();

            if (!$instance instanceof MetadataReaderManagerInterface) {
                $errMsg = sprintf('Metadata reader manager not implement %s', MetadataReaderManagerInterface::class);
                throw new Exception\ErrorInitModuleException($errMsg);
            }
            $this->metadataReaderManager = $instance;
        } catch (\Exception $e) {
            throw new Exception\ErrorInitModuleException($e->getMessage(), $e->getCode(), $e);
        }

        return $this->metadataReaderManager;
    }
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;
    }
1130039
public function searchManager()
    {
        if ($this->_manager === null) {
            $this->_manager = new Manager(
                $this->_repository(),
                $this->_collectionClass
            );
        }

        return $this->_manager;
    }
550794
public function actionRequest()
    {
        if (!$this->enablePasswordRecovery) {
            return $this->redirect(['/user/security/login']);
        }
        /** @var RecoveryForm $model */
        $model = new RecoveryForm(['scenario' => 'request']);
        if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }
        if ($model->load(Yii::$app->request->post()) && $model->sendRecoveryMessage()) {
            return $this->redirect(['/user/recovery/request']);
        }
        return $this->render('request', ['model' => $model]);
    }
200528
protected function buildManager()
    {
        $config = new Configuration();

        $this->setUpGeneralConfigurations($config);
        $this->setUpSpecificConfigurations($config);

        $eventManager = $this->getEventManager();
        if ($this->getEventSubscribers() !== null) {
            /* @var array $eventSubscribers */
            $eventSubscribers = $this->getEventSubscribers();

            foreach ($eventSubscribers as $eventSubscriber) {
                $eventManager->addEventSubscriber($eventSubscriber);
            }
        }

        $entityManager = EntityManager::create($this->getOption('connection'), $config, $eventManager);

        $customMappingTypes = $this->getCustomMappingTypes();

        $platform = $entityManager->getConnection()->getDatabasePlatform();
        foreach ($this->getCustomTypes() as $type => $class) {
            if (Type::hasType($type)) {
                Type::overrideType($type, $class);
            } else {
                Type::addType($type, $class);
            }

            $platform->registerDoctrineTypeMapping(
                $type,
                array_key_exists($type, $customMappingTypes) ? $customMappingTypes[$type] : $type
            );
        }

        return $entityManager;
    }
519247
protected function getResourceManager()
    {
        if ($this->resourceManager === null) {
            $this->resourceManager = Services::resourceManager();
        }
        return $this->resourceManager;
    }
829706
protected function _process()
    {
        if (is_callable($this->_handler)) {
            return $this->_processDelegated();
        }
        $spec = $this->_actual;

        if (!$spec instanceof Specification || $spec->passed() !== null) {
            return $this;
        }

        $closure = function () use ($spec) {
            $spec->reset();
            $spec->process($result);
            $this->_logs = $spec->logs();
            return $this->_passed = $spec->passed();
        };

        try {
            $this->_spin($closure);
        } catch (TimeoutException $e) {
        }
        if ($exception = $spec->log()->exception()) {
            throw $exception;
        }

        $this->_passed = $spec->passed() && ($this->_passed === null ? true : $this->_passed);
        return $this;
    }
245258
private function getResolverHandlerChain()
    {
        $randomResolver = $this->resolverFactory->create(Random::class);
        $nonMutualResolver = $this->resolverFactory->create(NonMutual::class, $randomResolver);

        return $this->resolverFactory->create(FromExistingPair::class, $nonMutualResolver);
    }