<commit_before><?php
class Vps_Component_Model_Row extends Vps_Model_Row_Abstract
{
    protected $_data;
    
    public function __construct(array $config)
    {
        $this->_data = $config['data'];
        parent::__construct($config);
    }

    public function __isset($name)
    {
        return isset($this->_data->$name);
    }

    public function __unset($name)
    {
        unset($this->_data->$name);
    }

    public function __get($name)
    {
        if (isset($this->_data->$name)) {
            return $this->_data->$name;
        } else {
            return null;
        }
    }

    //TODO: nicht immer gleich speichern
    public function __set($name, $value)
    {
        $table = new Vps_Dao_Pages;
        $row = $table->find($this->componentId)->current();
        $row->$name = $value;
        $row->save();
        $this->_data->$name = $value;
    }


    //TODO: hier speichern
    //TODO: _before/_afterUpdate aufrufen
    public function save()
    {
        $this->_beforeUpdate();
        if (isset($this->visible)) {
            $row = $this->_model->getTable()->find($this->componentId)->current();
            $row->visible = $this->visible;
            $ret = $row->save();
        }
        $this->_afterUpdate();
    }

    //TODO: _before/_afterDelete aufrufen
    public function delete()
    {
        $table = new Vps_Dao_Pages;
        $row = $table->find($this->componentId)->current();
        $row->delete();
    }
    
    public function getData()
    {
        return $this->_data;
    }

    public function toArray()
    {
        return array(
            'isPage' => $this->_data->isPage
        );
    }
}<commit_msg>fix regression<commit_after><?php
class Vps_Component_Model_Row extends Vps_Model_Row_Abstract
{
    protected $_data;
    
    public function __construct(array $config)
    {
        $this->_data = $config['data'];
        parent::__construct($config);
    }

    public function __isset($name)
    {
        return isset($this->_data->$name);
    }

    public function __unset($name)
    {
        unset($this->_data->$name);
    }

    public function __get($name)
    {
        if (isset($this->_data->$name)) {
            return $this->_data->$name;
        } else {
            return null;
        }
    }

    //TODO: nicht immer gleich speichern
    public function __set($name, $value)
    {
        $table = new Vps_Dao_Pages;
        $row = $table->find($this->componentId)->current();
        $row->$name = $value;
        $row->save();
        $this->_data->$name = $value;
    }


    //TODO: hier speichern
    //TODO: _before/_afterUpdate aufrufen
    public function save()
    {
        $this->_beforeUpdate();
        if (isset($this->visible)) {
            $row = $this->_model->getTable()->find($this->componentId)->current();
            $row->visible = $this->visible;
            $ret = $row->save();
        }
        $this->_afterUpdate();
        return $ret;
    }

    //TODO: _before/_afterDelete aufrufen
    public function delete()
    {
        $table = new Vps_Dao_Pages;
        $row = $table->find($this->componentId)->current();
        $row->delete();
    }
    
    public function getData()
    {
        return $this->_data;
    }

    public function toArray()
    {
        return array(
            'isPage' => $this->_data->isPage
        );
    }
}
{'fraction_non_alphanumeric': 0.15452930728241562, 'fraction_numerical': 0.0, 'mean_word_length': 1.9331597222222223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '634988', 'n_tokens_mistral': 1039, 'n_tokens_neox': 1032, 'n_words': 193}