src/Model/Attributes.php
public static function init(array $attributes) {
        $obj = new Attributes;
        foreach ($attributes as $attribute) {
            $obj->{$attribute->key} = $attribute;
        }
        return $obj;
    }
public static function init(array $attributes) {
        $obj = new Attributes;
        foreach ($attributes as $attribute) {
            $obj->{$attribute->key} = $attribute;
        }
        return $obj;
    }
public static function init ( array $ attributes ) { $ obj = new Attributes ; foreach ( $ attributes as $ attribute ) { $ obj -> { $ attribute -> key } = $ attribute ; } return $ obj ; }
Initialize from list of attributes.
@param Attribute[] $attributes
@return Attributes
Initialize from list of attributes .