<commit_before><?php
/**
 * Koowa Framework - http://developer.joomlatools.com/koowa
 *
 * @copyright	Copyright (C) 2007 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		http://github.com/joomlatools/koowa for the canonical source repository
 */

/**
 * Abstract Database Row
 *
 * @author  <NAME> <https://github.com/johanjanssens>
 * @package Koowa\Library\Database
 */
abstract class KDatabaseRowAbstract extends KObjectArray implements KDatabaseRowInterface
{
    /**
     * Tracks columns where data has been updated. Allows more specific save operations.
     *
     * @var array
     */
    protected $_modified = array();

    /**
     * Tracks the status the row
     *
     * Available row status values are defined as STATUS_ constants in KDatabase
     *
     * @var string
     * @see KDatabase
     */
    protected $_status = null;

    /**
     * The status message
     *
     * @var string
     */
    protected $_status_message = '';

    /**
     * Tracks if row data is new
     *
     * @var bool
     */
    protected $_new = true;

    /**
	 * Name of the identity column in the rowset
	 *
	 * @var	string
	 */
	protected $_identity_column;

    /**
     * Constructor
     *
     * @param   KObjectConfig $config Configuration options.
     */
    public function __construct(KObjectConfig $config = null)
    {
        //If no config is passed create it
        if(!isset($config)) $config = new KObjectConfig();

        parent::__construct($config);

        // Set the table identifier
    	if(isset($config->identity_column)) {
			$this->_identity_column = $config->identity_column;
		}

        // Reset the row
        $this->reset();

        // Set the new state of the row
        $this->_new = $config->new;

        // Set the row data
        if(isset($config->data))  {
            $this->setData((array) KObjectConfig::unbox($config->data), $this->_new);
        }

        //Set the status<commit_msg>re #91 : $config cannot be NULL.<commit_after><?php
/**
 * Koowa Framework - http://developer.joomlatools.com/koowa
 *
 * @copyright	Copyright (C) 2007 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		http://github.com/joomlatools/koowa for the canonical source repository
 */

/**
 * Abstract Database Row
 *
 * @author  <NAME> <https://github.com/johanjanssens>
 * @package Koowa\Library\Database
 */
abstract class KDatabaseRowAbstract extends KObjectArray implements KDatabaseRowInterface
{
    /**
     * Tracks columns where data has been updated. Allows more specific save operations.
     *
     * @var array
     */
    protected $_modified = array();

    /**
     * Tracks the status the row
     *
     * Available row status values are defined as STATUS_ constants in KDatabase
     *
     * @var string
     * @see KDatabase
     */
    protected $_status = null;

    /**
     * The status message
     *
     * @var string
     */
    protected $_status_message = '';

    /**
     * Tracks if row data is new
     *
     * @var bool
     */
    protected $_new = true;

    /**
	 * Name of the identity column in the rowset
	 *
	 * @var	string
	 */
	protected $_identity_column;

    /**
     * Constructor
     *
     * @param   KObjectConfig $config Configuration options.
     */
    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        // Set the table identifier
    	if(isset($config->identity_column)) {
			$this->_identity_column = $config->identity_column;
		}

        // Reset the row
        $this->reset();

        // Set the new state of the row
        $this->_new = $config->new;

        // Set the row data
        if(isset($config->data))  {
            $this->setData((array) KObjectConfig::unbox($config->data), $this->_new);
        }

        //Set the status
{'fraction_non_alphanumeric': 0.12408204608761712, 'fraction_numerical': 0.0050645733096986575, 'mean_word_length': 2.251028806584362, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '10947', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1146, 'n_words': 321}