GraphQL\Type\Definition\FieldArgument::__construct PHP Метод

__construct() публичный Метод

FieldArgument constructor.
public __construct ( array $def )
$def array
    public function __construct(array $def)
    {
        foreach ($def as $key => $value) {
            switch ($key) {
                case 'type':
                    $this->type = $value;
                    break;
                case 'name':
                    $this->name = $value;
                    break;
                case 'defaultValue':
                    $this->defaultValue = $value;
                    $this->defaultValueExists = true;
                    break;
                case 'description':
                    $this->description = $value;
                    break;
            }
        }
        $this->config = $def;
    }