| @@ 5-19 (lines=15) @@ | ||
| 2 | ||
| 3 | namespace HansOtt\GraphQL\Query; |
|
| 4 | ||
| 5 | final class TypeNamed extends NodeBase implements Type |
|
| 6 | { |
|
| 7 | public $name; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * @param string $name |
|
| 11 | * @param Location|null $location |
|
| 12 | */ |
|
| 13 | public function __construct($name, Location $location = null) |
|
| 14 | { |
|
| 15 | parent::__construct($location); |
|
| 16 | $this->name = (string) $name; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getChildren() |
|
| 20 | { |
|
| 21 | return array(); |
|
| 22 | } |
|
| @@ 5-19 (lines=15) @@ | ||
| 2 | ||
| 3 | namespace HansOtt\GraphQL\Query; |
|
| 4 | ||
| 5 | final class TypeNonNull extends NodeBase implements Type |
|
| 6 | { |
|
| 7 | public $type; |
|
| 8 | ||
| 9 | public function __construct(Type $type, Location $location = null) |
|
| 10 | { |
|
| 11 | parent::__construct($location); |
|
| 12 | $this->type = $type; |
|
| 13 | } |
|
| 14 | ||
| 15 | public function getChildren() |
|
| 16 | { |
|
| 17 | return array($this->type); |
|
| 18 | } |
|
| 19 | } |
|
| 20 | ||
| @@ 5-23 (lines=19) @@ | ||
| 2 | ||
| 3 | namespace HansOtt\GraphQL\Query; |
|
| 4 | ||
| 5 | final class TypeList extends NodeBase implements Type |
|
| 6 | { |
|
| 7 | public $type; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * @param Type $type |
|
| 11 | * @param Location|null $location |
|
| 12 | */ |
|
| 13 | public function __construct(Type $type, Location $location = null) |
|
| 14 | { |
|
| 15 | parent::__construct($location); |
|
| 16 | $this->type = $type; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getChildren() |
|
| 20 | { |
|
| 21 | return array($this->type); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||