<commit_before><?php

/*
 * This file is part of the 'org.octris.core' package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace org\octris\core\db\device {
    /**
     * SQLite database device. 
     * 
     * @octdoc      c:device/sqlite
     * @copyright   copyright (c) 2012-2013 by <NAME>
     * @author      <NAME> <<EMAIL>>
     * 
     * @todo        Support encryption Libraries:
     *              * http://sqlcipher.net/
     *              * http://www.hwaci.com/sw/sqlite/see.html
     *              * http://sqlite-crypt.com/index.htm
     */
    class sqlite extends \org\octris\core\db\device
    /**/
    {
        /**
         * SQLite flags of how to open database.
         *
         * @octdoc  d:sqlite/T_READONLY, T_READWRITE, T_CREATE
         * @var     int
         */
        const T_READONLY  = SQLITE3_OPEN_READONLY;
        const T_READWRITE = SQLITE3_OPEN_READWRITE;
        const T_CREATE    = SQLITE3_OPEN_CREATE;
        /**/

        /**
         * Constructor.
         *
         * @octdoc  m:sqlite/__construct
         * @param   string          $file               Path to the SQLite database, or :memory: to use in-memory database.
         * @param   int             $flags              Optional flags of how to open SQLite database.
         * @param   string          $key                Optional key when database encryption is used.
         */
        public function __construct($file, $flags = null, $key = null)
        /**/
        {
            parent::__construct();

            $this->addHost(\org\octris\core\db::T_DB_MASTER, array(
                'file'  => $host,
                'flags' => (is_null($flags)
                            ? self::T_READWRITE | self::T_CREATE
                            : $flags),
                'key'   => $key
            ));
        }

        /**
         * Create database connection.
         *
         * @octdoc  m:sqlite/getConnection
         * @param   array                       $options        Host configuration options.
         * @return  \org\octris\core\db\device\onnection_if     Connection to a database.
         */<commit_msg>bugfix: replaced var<commit_after><?php

/*
 * This file is part of the 'org.octris.core' package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace org\octris\core\db\device {
    /**
     * SQLite database device. 
     * 
     * @octdoc      c:device/sqlite
     * @copyright   copyright (c) 2012-2013 by <NAME>
     * @author      <NAME> <<EMAIL>>
     * 
     * @todo        Support encryption Libraries:
     *              * http://sqlcipher.net/
     *              * http://www.hwaci.com/sw/sqlite/see.html
     *              * http://sqlite-crypt.com/index.htm
     */
    class sqlite extends \org\octris\core\db\device
    /**/
    {
        /**
         * SQLite flags of how to open database.
         *
         * @octdoc  d:sqlite/T_READONLY, T_READWRITE, T_CREATE
         * @var     int
         */
        const T_READONLY  = SQLITE3_OPEN_READONLY;
        const T_READWRITE = SQLITE3_OPEN_READWRITE;
        const T_CREATE    = SQLITE3_OPEN_CREATE;
        /**/

        /**
         * Constructor.
         *
         * @octdoc  m:sqlite/__construct
         * @param   string          $file               Path to the SQLite database, or :memory: to use in-memory database.
         * @param   int             $flags              Optional flags of how to open SQLite database.
         * @param   string          $key                Optional key when database encryption is used.
         */
        public function __construct($file, $flags = null, $key = null)
        /**/
        {
            parent::__construct();

            $this->addHost(\org\octris\core\db::T_DB_MASTER, array(
                'file'  => $file,
                'flags' => (is_null($flags)
                            ? self::T_READWRITE | self::T_CREATE
                            : $flags),
                'key'   => $key
            ));
        }

        /**
         * Create database connection.
         *
         * @octdoc  m:sqlite/getConnection
         * @param   array                       $options        Host configuration options.
         * @return  \org\octris\core\db\device\onnection_if     Connection to a database.
         */
{'fraction_non_alphanumeric': 0.10861423220973783, 'fraction_numerical': 0.004846882573254021, 'mean_word_length': 1.3832020997375327, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7126462', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1276, 'n_words': 310}