protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
protected function setAttribute ( string $ name , $ value ) : void { // Convert values switch ( $ name ) { case 'name' : // no break here case 'value' : $ value = ( string ) $ value ; break ; case 'prefixed' : $ value = ( boolean ) $ value ; break ; } $ this -> $ name = $ value ; }
Sets an object attribute to a value.

@param string $name  The name of the object attribute
@param mixed  $value The value of the object attribute
Sets an object attribute to a value .