Initializes varnish pool

@return $this
@throws VarnishException
551638
protected function _initVarnishPool()
    {
        $this->pool = new VarnishPool();

        $addresses =  Mage::getStoreConfig(self::XML_PATH_VARNISH_SERVER);
        $secret = Mage::getStoreConfig(self::XML_PATH_VARNISH_SECRET);

        if (Mage::getStoreConfigFlag(self::XML_PATH_VARNISH_SECRET_NEWLINE)) {
            $secret .= "\n";
        }
        
        $lines = explode("\n", $addresses);
        $instantiated = array();
        foreach ($lines as $line) {
            $line = trim($line);
            
            if (!preg_match('/^[a-z0-9_\-\.]+:\d+$/', $line)
                || isset($instantiated[$line])) {
                continue;
            }
            
            list($host, $port) = explode(':', $line);

            try {
                $this->pool->addServer(new VarnishAdmin($host, $port, $secret));
            } catch (VarnishException $e) {
                Mage::logException($e);
            }

            $instantiated[$line] = true;
        }

        $this->pool->setIgnoreOnFail(true);

        return $this;
    }
738945
private function initBundles()
    {
        $bundleLoader = $this->getContainer()->get('bundle.loader');
        if (!$bundleLoader->isRestored() && null !== $this->getConfig()->getBundlesConfig()) {
            $bundleLoader->load($this->getConfig()->getBundlesConfig());
        }

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

        session_set_save_handler($manager);

        return $manager;
    }
1358698
public function init()
    {
        if ($this->isEnabled()) {
            $this->xmppclient = \PHPDaemon\Clients\XMPP\Pool::getInstance();
        }
    }
1340422
private function initializeOnDemand()
    {
        if ($this->initialized === false) {

            $this->initialized = true;
            $this->cache = $this->cacheMapper->fetchAll();

            // Run garbage collection on each HTTP request
            $this->gc();
        }
    }
59227
private function initTemplateEntities(): self
    {
        if (null !== $this->templateEntities) {
            return $this;
        }
        $this->templateEntities = new ArrayCollection();

        return $this;
    }
382188
public function initialize()
    {
        // check if we have already initialized the router
        if ($this->initializedFlag) {
            return;
        }

        // do initialization
        $this->loader = new ConfigLoader(self::getConfig()->get('Routes', new ConfigObject([])));
        self::$routeCollection = $this->loader->getRouteCollection();
        $this->urlMatcher = new UrlMatcher();
        $this->urlGenerator = new UrlGenerator();

        $this->setCache(self::getConfig()->get('Cache', false));
        $this->initializedFlag = true;
    }
1043556
protected function initialize()
    {
        if ($this->initialized) {
            return;
        }

        foreach ($this->classes as $class) {
            $this->providers[] = new $class;
        }

        foreach ($this->providers as $provider) {
            if ($provider instanceof BuilderAwareInterface) {
                $provider->setSchemaBuilder($this->schemaBuilder);
            }
        }

        $this->initialized = true;
    }
241928
public function initialize()
    {
        if ($this->initialized === true) {
            return;
        }
        if ($this->canBeInitialized() === false) {
            throw new Exception('The security Context cannot be initialized yet. Please check if it can be initialized with $securityContext->canBeInitialized() before trying to do so.', 1358513802);
        }

        $sessionDataContainer = $this->objectManager->get(SessionDataContainer::class);
        $factoryTokens = $this->tokenAndProviderFactory->getTokens();
        $tokens = $this->mergeTokens($factoryTokens, $sessionDataContainer->getSecurityTokens());
        $this->separateActiveAndInactiveTokens($tokens);
        $this->updateTokens($this->activeTokens);

        $this->initialized = true;
    }
700859
protected function initializeProxy(): void
    {
        //Initialize internal vars
        $this->states = [];
        $this->activesStates = [];
        $this->callerStatedClassesStack = new \SplStack();
        //Creates
        $this->loadStates();
    }
1094194
public function init()
    {
        $this->message = Swift_Message::newInstance(
            null,
            null,
            Config::get('content_type'),
            Config::get('charset')
        )
            ->setFrom(Config::get('addr'), Config::get('name'));

        return $this;
    }
343914
public function init()
{
    $req = $this;

    $job = $this->job = new \PHPDaemon\Core\ComplexJob(function () use ($req) { // called when job is done

        $req->wakeup(); // wake up the request immediately

    });

    $job('pingjob', function ($name, $job) use ($req) { // registering job named 'pingjob'

        \PHPDaemon\Clients\ICMP\Pool::getInstance()->sendPing('8.8.8.8', function ($latency) use ($name, $job) {
            $job->setResult($name, $latency);
        });
    });

    $job(); // let the fun begin

    $this->sleep(5, true); // setting timeout
}
838689
protected function init()
    {
        if ($this->container) {
            return;
        }

        $this->container = new Container();
        $this->connectionPool = new Pool();
        $this->cacheComponent = new CacheComponent();

        $this->container->instance(Pool::class, $this->connectionPool);
        $this->container->instance(CacheComponentInterface::class, $this->cacheComponent);
        Ioc::setContainer($this->container);

        static::$singleton = $this;
    }
12993
protected function initTypes()
    {
        foreach ($this->result->getFieldNames() as $index => $name) {
            $type = $this->result->getFieldType($name);

            if ($type === null) {
                $type = 'text';
            }

            $this->types[$name] = $type;
            $this->converters[$name] = $this
                ->session
                ->getClientUsingPooler('converter', $type)
            ;
        }

        return $this;
    }
689594
private function initLoaders()
    {
        $namespace = sprintf('%s\\ServiceLoader', __NAMESPACE__);
        $classes = ['MetadataCache', 'MetadataDrivers', 'MetadataFactory', 'Persisters', 'Rest', 'SearchClients'];

        foreach ($classes as $class) {
            $fqcn = sprintf('%s\\%s', $namespace, $class);
            $this->addLoader(new $fqcn);
        }
        return $this;
    }
629143
private void initPool() {
        if (logger.isWarnEnabled()) {
            logger.warn("Start to initialize connection pool with url: " + url + " ...");
        }

        for (int i = 0; (i < initialSize) && (xpool.size() < initialSize); i++) {
            pool.lock();

            try {
                if (pool.isClosed()) {
                    break;
                }

                if ((i < initialSize) && (xpool.size() < initialSize)) {
                    PoolableConnection poolableConn = newConnection();

                    if (!pool.add(poolableConn)) {
                        detroyConnection(poolableConn);
                    }
                }
            } finally {
                pool.unlock();
            }
        }

        if (logger.isWarnEnabled()) {
            logger.warn("End to initialize connection pool with url: " + url + " ...");
        }
    }
1351368
public function init()
    {
        return $this
            ->setEvents(array())
            ->setGroups(array())
            ->setModules(array())
            ->setNodeClass(null)
            ->setLogger(null)
            ->setWebSocketServer(null)
            ->setKernelEnvironment(null)
        ;
    }