Initializes the repository's prepared statements.

@return void
161654
public function init()
    {

        // initialize the prepared statements
        $this->bundleOptionValueStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::BUNDLE_OPTION_VALUE));
    }
680127
public function initialize()
    {
        if (is_null($value = $this->getValue())) {
            $value = request()->input($this->getAlias());
        }

        $this->setValue($value);
    }
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();
    }
113405
public function init()
    {

        // initialize the prepared statements
        $this->categoryTextsStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CATEGORY_TEXTS));
        $this->categoryTextsByPkAndStoreIdStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CATEGORY_TEXTS_BY_PK_AND_STORE_ID));
    }
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());
        }
    }
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();
        }
    }
1249851
public function init()
    {

        // initialize the prepared statements
        $this->customerVarcharsStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CUSTOMER_ADDRESS_VARCHARS));
        $this->customerVarcharByAttributeCodeAndEntityTypeIdAndAndValueStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CUSTOMER_ADDRESS_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_VALUE));
    }
763501
public function initialize() {
        $this->keepSnapshots(true);
        $this->setup(
            array(
                'exceptionOnFailedSave' => true, //Throw an exception instead of returning false from saves
                'notNullValidations' => false //Allow empty strings instead of the wtf new \Phalcon\Db\RawValue('""');
            )
        );
        //Sets to only update the fields that are changed
        $this->useDynamicUpdate(true);
    }
408632
public function init()
    {

        // initialize the prepared statements
        $this->categoryProductStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CATEGORY_PRODUCT));
        $this->categoryProductsBySkuStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CATEGORY_PRODUCT_BY_SKU));
    }
1110656
public function init()
    {

        // initialize the prepared statements
        $this->productMediaGalleryValueStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::PRODUCT_MEDIA_GALLERY_VALUE));
    }
987900
public function init()
    {
        $select = new QueryBuilder();

        $select
            ->query("CREATE TABLE IF NOT EXISTS {$this->table} (id int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, param VARCHAR(250) NOT NULL, value VARCHAR(250) NOT NULL)")
            ->execute();

        $migrateVersion = $select
            ->query("SELECT value FROM {$this->table} WHERE param = 'migration_version'")
            ->fetchRow();

        if (isset($migrateVersion['value'])) {
            echo Utils::colorize("Migration tool is already initialized", "NOTE");
        } else {
            $select
                ->query("INSERT into {$this->table} (param, value) VALUES ('migration_version', 0)")
                ->execute();
            echo Utils::colorize("Initialization successful.", "SUCCESS");
        }
    }
795795
public function init()
	{
		// generic driver initialisation
		parent::init();

		if ($this->redis === false)
		{
			// get the redis database instance
			$this->redis = \Redis_Db::instance($this->config['database']);
		}
	}
1313558
private function initialize()
    {
        $this->pdo->exec(
            'CREATE TABLE IF NOT EXISTS `'.$this->table.'` '
            .'(id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED, INDEX(channel) USING HASH, INDEX(level) USING HASH, INDEX(time) USING BTREE)'
        );

        //Read out actual columns
        $actualFields = array();
        $rs = $this->pdo->query('SELECT * FROM `'.$this->table.'` LIMIT 0');
        for ($i = 0; $i < $rs->columnCount(); $i++) {
            $col = $rs->getColumnMeta($i);
            $actualFields[] = $col['name'];
        }

        //Calculate changed entries
        $removedColumns = array_diff(
            $actualFields,
            $this->additionalFields,
            $this->defaultfields
        );
        $addedColumns = array_diff($this->additionalFields, $actualFields);

        //Remove columns
        if (!empty($removedColumns)) {
            foreach ($removedColumns as $c) {
                $this->pdo->exec('ALTER TABLE `'.$this->table.'` DROP `'.$c.'`;');
            }
        }

        //Add columns
        if (!empty($addedColumns)) {
            foreach ($addedColumns as $c) {
                $this->pdo->exec('ALTER TABLE `'.$this->table.'` add `'.$c.'` TEXT NULL DEFAULT NULL;');
            }
        }

        // merge default and additional field to one array
        $this->defaultfields = array_merge($this->defaultfields, $this->additionalFields);

        $this->initialized = true;
    }
565190
public function init()
    {

        // initialize the prepared statements
        $this->bundleSelectionPriceStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::BUNDLE_SELECTION_PRICE));
    }
683787
public function initialize()
    {
        if ($this->all()->count() < 1) {
            return;
        }

        $this->all()->each(function (ActionInterface $action) {
            $action->initialize();
        });

        $this->setHtmlAttribute('data-type', 'display-actions');

        if (! $this->hasHtmlAttribute('class')) {
            $this->setHtmlAttribute('class', 'panel-footer');
        }
    }
995308
public function init()
    {

        // initialize the prepared statements
        $this->customerVarcharsStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CUSTOMER_VARCHARS));
        $this->customerVarcharByAttributeCodeAndEntityTypeIdAndAndValueStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CUSTOMER_VARCHAR_BY_ATTRIBUTE_CODE_AND_ENTITY_TYPE_ID_AND_VALUE));
    }
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;
    }