protected function init()
    {
        $clsname = get_called_class();
        if (property_exists($clsname, 'defaults')) {
            foreach($clsname::$defaults as $name=>$value) {
                $this->{$name} = $value;
            }
        }
        return $this;
    }
protected function init()
    {
        $clsname = get_called_class();
        if (property_exists($clsname, 'defaults')) {
            foreach($clsname::$defaults as $name=>$value) {
                $this->{$name} = $value;
            }
        }
        return $this;
    }
protected function init ( ) { $ clsname = get_called_class ( ) ; if ( property_exists ( $ clsname , 'defaults' ) ) { foreach ( $ clsname :: $ defaults as $ name => $ value ) { $ this -> { $ name } = $ value ; } } return $ this ; }
Initialize the object with default values and first settings

@return self `$this` for method chaining
Initialize the object with default values and first settings