creatoro / jelly

A flexible ORM for Kohana 3.1+
http://jelly.jonathan-geiger.com
MIT License
72 stars 13 forks source link

Throw exception if we are changing initialized Jelly_Meta #70

Closed loonies closed 13 years ago

loonies commented 13 years ago

Instead of silently ignoring propery change, Jelly_Meta::set should throw an exception if it is already initialized.

protected function set($key, $value)
{
    if ($this->_initialized)
        throw new Kohana_Exception('Jelly_Meta already initialized... bla, bla...');

    $this->{'_'.$key} = $value;

    return $this;
}