public static function fromArray($array=array())
    {
        $className = get_called_class();

        // hack that uses object deserialization to bypass constructor
        $object = unserialize(sprintf('O:%d:"%s":0:{}',
            strlen($className),
            $className));

        $object->_data = $array;
        $object->_saved = true;

        return $object;
    }
public static function fromArray($array=array())
    {
        $className = get_called_class();

        // hack that uses object deserialization to bypass constructor
        $object = unserialize(sprintf('O:%d:"%s":0:{}',
            strlen($className),
            $className));

        $object->_data = $array;
        $object->_saved = true;

        return $object;
    }
public static function fromArray ( $ array = array ( ) ) { $ className = get_called_class ( ) ; // hack that uses object deserialization to bypass constructor $ object = unserialize ( sprintf ( 'O:%d:"%s":0:{}' , strlen ( $ className ) , $ className ) ) ; $ object -> _data = $ array ; $ object -> _saved = true ; return $ object ; }
Creates an instance from an array, bypassing the constructor and setters
Creates an instance from an array bypassing the constructor and setters