Initializes the repository's prepared statements.

@return void
776599
public function init()
    {

        // initialize the prepared statements
        $this->productLinkStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_LINK));
    }
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }
70286
private function initialize()
    {
        $this->tablename = sprintf('%s%s', $this->app['config']->get('general/database/prefix', 'bolt_'), 'log_change');
        $this->allowed = ['INSERT', 'UPDATE', 'DELETE'];
        $this->initialized = true;
    }
431436
public function prepare()
    {
        if (null === $this->statement) {
            $this->statement = $this->db->prepare($this->getSql());
        }

        return $this;
    }
915295
public function init()
    {

        // initialize the prepared statements
        $this->productMediaGalleryValueToEntityStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_MEDIA_GALLERY_VALUE_TO_ENTITY));
    }
397793
private function Initialize()
    {
        if (!$this->initialized)
        {
            $schema = $this->GetSchema();
            $t = $schema->Table();
            $sql = $schema->SqlBuilder();
           
            $what = $t->ToSelectList();
            $where = $sql->Equals($t->Field($schema->KeyField()), $sql->Value($this->KeyValue()));
            $select = $sql->Select(false, $what, $t, $where);
            $reader = $schema->Connection()->ExecuteQuery((string)$select);
            if ($reader->Read())
                $this->InitFromReader($reader);

            $reader->Close();
        }
    }
97386
public function init()
    {
        if (!$this->getQuery()) {
            throw new \RuntimeException('Uninitialized QueryBuilder');
        }

        $this->resetIterator();
        $this->setNbResults($this->computeNbResult());

        if (0 == $this->getPage() || 0 == $this->getMaxPerPage() || 0 == $this->getNbResults()) {
            $this->setLastPage(0);
            $this->getQuery()->setFirstResult(0);
            $this->getQuery()->setMaxResults(0);
        } else {
            $offset = ($this->getPage() - 1) * $this->getMaxPerPage();
            $this->setLastPage(ceil($this->getNbResults() / $this->getMaxPerPage()));
            $this->getQuery()->setFirstResult($offset);
            $this->getQuery()->setMaxResults($this->getMaxPerPage());
        }
    }
69929
public function init()
    {

        // initialize the prepared statements
        $this->productTextsStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_TEXTS));
    }
549585
public function init()
    {

        // initialize the prepared statements
        $this->productSuperLinkStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_SUPER_LINK));
    }
687696
public function init()
    {

        // initialize the prepared statements
        $this->productVarcharsStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_VARCHARS));
        $this->productVarcharByAttributeCodeAndEntityTypeIdAndStoreIdAndValueStmt =
                $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_STORE_ID_AND_VALUE));
    }
647801
public function initialize()
    {
        $app = $this->app;

        $include = $app->request->get('!include');
        if (!empty($include)) {
            Norm::options('include', true);
        }

        $tz = $app->request->get('!tz');
        if (!empty($tz)) {
            Norm::options('tz', $tz);
        }

        if (!isset($this->options['datasources'])) {
            $this->options['datasources'] = $this->app->config('norm.datasources');
        }

        // DEPRECATED: norm.databases deprecated
        if (!isset($this->options['datasources'])) {
            $this->options['datasources'] = $this->app->config('norm.databases');
        }

        if (!isset($this->options['datasources'])) {
            throw new \Exception('[Norm] No data source configuration. Append "norm.datasources" bono configuration!');
        }

        if (!isset($this->options['collections'])) {
            $this->options['collections'] = $this->app->config('norm.collections');
        }

        Norm::init($this->options['datasources'], $this->options['collections']);

        $controllerConfig = $this->app->config('bono.controllers');
        if (!isset($controllerConfig['default'])) {
            $controllerConfig['default'] = 'Norm\\Controller\\NormController';
        }
        $this->app->config('bono.controllers', $controllerConfig);

        if (! class_exists('Norm')) {
            class_alias('Norm\\Norm', 'Norm');
        }

        $d = explode(DIRECTORY_SEPARATOR.'src', __DIR__);
        $this->app->theme->addBaseDirectory($d[0], 10);
    }
819990
public function init()
    {
        if ($this->initialized) {
            return;
        }

        $parameters = [];

        foreach ($this->parameterRepository->getAllParameters() as $parameter) {
            $configurationName = $parameter->getConfigurationName();

            if (!isset($parameters[$configurationName])) {
                $parameters[$configurationName] = [];
            }

            $parameters[$configurationName][$parameter->getName()] = $parameter;
        }

        $this->persistedParameters = $parameters;

        foreach ($this->configurations as $configuration) {
            $configurationName = $configuration->getName();
            $this->initConfiguration(
                $configuration,
                isset($parameters[$configurationName]) ? $parameters[$configurationName] : []
            );
        }

        $this->initialized = true;
    }
1239169
public function init()
    {
        parent::init();
        $db = $this->getDb();
        if (!isset($this->options['user'])) {
            $this->options['user'] = $db->username;
        }
        if (!isset($this->options['password'])) {
            $this->options['password'] = $db->password;
        }
        $parsed = $this->parseConnectionString($db->connectionString);
        if (!isset($this->options['host'])) {
            $this->options['host'] = $parsed['hostName'];
        }
        if (!isset($this->options['port']) && isset($parsed['port'])) {
            $this->options['port'] = $parsed['port'];
        }
    }
297
public function init()
    {
        $host =getenv('PDO_HOST');
        if($host) {
            $this->setHost(trim($host));
        }

        $database = getenv('PDO_DATABASE');
        if($database) {
            $this->setDatabase(trim($database));
        }
        $user = getenv('PDO_USER');
        if($user) {
            $this->setUser($user);
        }

        $password = getenv('PDO_PASSWORD');
        if($password) {
            $this->setPassword($password);
        }
    }
853124
public function prepareTable()
    {
        $driver = $this->db->getDriver();
        $tableExistsSql = sprintf($this->checkTableSqls[$driver], $this->table);
        if ($this->checkTable && !$this->db->fetchColumn($tableExistsSql)) {
            $createTableSql = sprintf($this->createTableSqls[$driver], $this->table);
            $this->db->executeUpdate($createTableSql);
        }
    }
1249605
public function initialize() : void
  {
    $connection = config('database.default');

    Accessor::$appRoot       = config('app.dir');
    UpstartConfig::$database = config("database.connections.{$connection}");

    if (!DB::start()) {
      $this->exception('Could not establish a database connection.');
    }

    $this->loadView();
  }
1123840
public function init()
    {
        parent::init();
        $this->db = Instance::ensure($this->db, Connection::className());
        if ($this->cache !== null) {
            $this->cache = Instance::ensure($this->cache, Cache::className());
        }
    }