src/Types/Base/BaseObject.php
public static function build(array $values)
    {
        $result = new static;

        foreach ($values as $field => $value) {
            /** @var $className TypeInterface */
            $result->$field = $value;
        }

        return $result;
    }
public static function build(array $values)
    {
        $result = new static;

        foreach ($values as $field => $value) {
            /** @var $className TypeInterface */
            $result->$field = $value;
        }

        return $result;
    }
public static function build ( array $ values ) { $ result = new static ; foreach ( $ values as $ field => $ value ) { /** @var $className TypeInterface */ $ result -> $ field = $ value ; } return $ result ; }
Builds object from array of field values indexed by field name.

@param array $values
@return static
Builds object from array of field values indexed by field name .