Create a initializer system

@return Initializer
189905
private function createInitializer()
    {
        $initializer = new Initializer();

        $initializer->addTemplate('Common', new CommonTemplate());
        $initializer->addTemplate('Laravel', new LaravelTemplate());
        $initializer->addTemplate('Symfony', new SymfonyTemplate());
        $initializer->addTemplate('Yii', new YiiTemplate());
        $initializer->addTemplate('Yii2 Basic App', new Yii2BasicAppTemplate());
        $initializer->addTemplate('Yii2 Advanced App', new Yii2AdvancedAppTemplate());
        $initializer->addTemplate('Zend Framework', new ZendTemplate());
        $initializer->addTemplate('CakePHP', new CakeTemplate());
        $initializer->addTemplate('CodeIgniter', new CodeIgniterTemplate());
        $initializer->addTemplate('Drupal', new DrupalTemplate());
        $initializer->addTemplate('TYPO3', new Typo3Template());

        return $initializer;
    }
1137103
public function initialize()
    {
        $driver = null;

        if (
            !in_array(strtolower($this->_class), $this->_supportedTypes) &&
            class_exists($this->_class)
        ) {
            $class = $this->_class;
            $driver = new $class($this->_options);
            if (!is_a($driver, 'Slick\Cache\DriverInterface')) {
                throw new Exception\InvalidDriverException(
                    "Class {$class} doesn't implement " .
                    "Slick\Cache\DriverInterface interface."
                );
            }
            return $driver;
        }

        switch (strtolower($this->_class)) {

            case 'file':            
                $driver = new Driver\File($this->_options);
                break;

            case 'memcached':            
                $driver = new Driver\Memcached($this->_options);
                break;

            default:
                throw new Exception\InvalidDriverException(
                    "Type {$this->_class} cache driver doesn't exists."
                );

        }
        return $driver;
    }
206253
protected function _initAction()
    {
        $this->loadLayout()
            ->_setActiveMenu('system/aoe_profiler')
            ->_addBreadcrumb(Mage::helper('aoe_profiler')->__('System'),
                Mage::helper('aoe_profiler')->__('System'))
            ->_addBreadcrumb(Mage::helper('aoe_profiler')->__('AOE Profiler'),
                Mage::helper('aoe_profiler')->__('AOE Profiler'));
        return $this;
    }
852948
public static Initializer defaultInitializer() {
      return newInitializer()
              .setCloseConcurrency(0)
              .setTestOnLogicalOpen(false)
              .setTestOnLogicalClose(false)
              .setIncompleteTransactionOnClosePolicy(ConnectionPoolConnection.IncompleteTransactionPolicy.REPORT)
              .setOpenStatementOnClosePolicy(ConnectionPoolConnection.OpenStatementPolicy.REPORT)
              .setForceRealClosePolicy(ConnectionPoolConnection.ForceRealClosePolicy.CONNECTION_WITH_LIMIT)
              .setActivityTimeoutPolicy(ConnectionPoolConnection.ActivityTimeoutPolicy.LOG)
              .setCloseTimeLimitMillis(10 * 1000L)
              .setActiveTimeout(60, TimeUnit.SECONDS)
              .setConnectionLifetime(15, TimeUnit.MINUTES)
              .setMaxConcurrentReconnects(2)
              .setMaxReconnectDelay(1, TimeUnit.MINUTES)
              .setActiveTimeoutMonitorFrequency(30, TimeUnit.SECONDS);
   }
704233
protected function initLogger(): self
    {
        $settings = $this->container->get("settings");

        $logger = new Logger($settings["logger"]["channel"]);
        $logger->pushHandler(new $settings["logger"]["class"][0](...$settings["logger"]["class"][1]));

        $this->container->set("core-logger", $logger);
        return $this;
    }
527140
protected function _initLoader()
    {
        $loader = $this->createProjectClass('Loader', $this->getContainer(), $this->_loaderDirs);

        \MUtil_Model::setSource($loader, true);

        return $loader;
    }
100355
public static function initialize()
    {
        if (!isset($GLOBALS['_SESSION']) or !($GLOBALS['_SESSION'] instanceof self)) {
            $GLOBALS['_SESSION'] = self::getInstance();
        }

        return self::getInstance();
    }
770379
public static function initialize()
    {
        $manager = self::$manager = new self();
        $manager->seedHandlerStack();

        session_set_save_handler($manager);

        return $manager;
    }
176985
private function initDefaultClasses()
	{
		$this['loader'] = $this->share(function ($app) {
			return new ClassLoader();
		});

		$this['config'] = $this->share(function ($app) {
			$config = new Config();
			$config->addHint($app['path.root'] . '/resources/config/');
			return $config;
		});

		$this->instance('app', $this);
	}
1352715
protected function initDefaults()
    {
        $this->bindShared( 'RawPHP\RawDispatcher\Contract\IDispatcher', function ()
        {
            return new Dispatcher();
        }
        );

        $this->bindShared( 'RawPHP\RawFileSystem\Contract\IFileSystem', function ()
        {
            return new FileSystem();
        }
        );

        $this->alias( 'RawPHP\RawDispatcher\Contract\IDispatcher', 'dispatcher' );
        $this->alias( 'RawPHP\RawFileSystem\Contract\IFileSystem', 'files' );
    }
971389
function init() {
        if (is_null($this->conf)) {
            $this->conf = [];
        }
        
        $yp = parse_ini_file("yunpian.ini");
        foreach ($yp as $key => $value) {
            $this->conf[$key] = $value;
        }
        return $this;
    }
468789
protected function loadInits()
    {
        $this->hook->trigger(self::HOOK_LOAD_INITS_BEFORE);

        if ($this->config->get('parable.inits')) {
            $initLoader = \Parable\DI\Container::create(\Parable\Framework\Loader\InitLoader::class);
            $initLoader->load($this->config->get('parable.inits'));
        }

        $this->hook->trigger(self::HOOK_LOAD_INITS_AFTER);
        return $this;
    }
808301
protected static function initialize()
    {
        $class = static::class;

        if (static::$constants === null) {
            static::$constants = (new \ReflectionClass($class))->getConstants();

            foreach (static::names() as $name) {
                static::$lcKeyMap[strtolower($name)] = $name;
            }
        }
    }
949336
private static function initializeResources()
    {
        if (self::$initialized) {
            return;
        }

        Resource::init();

        Resources\User::init();
        Resources\Application::init();
        Resources\Identity::init();
        Resources\Processor::init();
        Resources\Merchant::init();
        Resources\PaymentInstrument::init();
        Resources\PaymentCard::init();
        Resources\BankAccount::init();
        Resources\Authorization::init();
        Resources\Transfer::init();
        Resources\Reversal::init();
        Resources\Dispute::init();
        Resources\Webhook::init();
        Resources\Settlement::init();
        Resources\Verification::init();
        Resources\Evidence::init();
        Resources\Token::init();
        Resources\InstrumentUpdate::init();

        self::$initialized = true;
    }
853248
function addInitializer(iContainerInitializer $initializer, $priority = null)
    {
        $priority = ($priority == null)
            ? ( ($initializer->getPriority() !== null) ? $initializer->getPriority() : 10)
            : $priority;

        $this->_getPriorityQueue()->insert($initializer, $priority);
        return $this;
    }
246176
protected function Init()
    {
        $this->container = new Container(Request::GetData('container'));
        $this->containerRights = new ContainerRights($this->container->GetUserGroupRights());
        $this->AddNameField();
        $this->AddUserGroupField();
        $this->AddSubmit();
        return parent::Init();
    }
718678
private function getInitializers(): array
    {
        if (empty($this->sortedInitializers)) {
            $this->sortedInitializers = $this->sortInitializers();
        }

        return $this->sortedInitializers;
    }