This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
1,799 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL; | ||
|
||
use Digia\GraphQL\Behavior\ConfigTrait; | ||
|
||
class ConfigObject | ||
{ | ||
|
||
use ConfigTrait; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST; | ||
|
||
use Digia\GraphQL\ConfigObject; | ||
|
||
class Location extends ConfigObject | ||
{ | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $start; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $end; | ||
|
||
/** | ||
* @var Token | ||
*/ | ||
private $startToken; | ||
|
||
/** | ||
* @var Token | ||
*/ | ||
private $endToken; | ||
|
||
/** | ||
* @var Source | ||
*/ | ||
private $source; | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getStart(): int | ||
{ | ||
return $this->start; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getEnd(): int | ||
{ | ||
return $this->end; | ||
} | ||
|
||
/** | ||
* @return Token | ||
*/ | ||
public function getStartToken(): Token | ||
{ | ||
return $this->startToken; | ||
} | ||
|
||
/** | ||
* @return Token | ||
*/ | ||
public function getEndToken(): Token | ||
{ | ||
return $this->endToken; | ||
} | ||
|
||
/** | ||
* @return Source | ||
*/ | ||
public function getSource(): Source | ||
{ | ||
return $this->source; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node; | ||
|
||
use Digia\GraphQL\Language\AST\KindEnum; | ||
use Digia\GraphQL\Language\AST\Node\Behavior\KindTrait; | ||
use Digia\GraphQL\Language\AST\Node\Behavior\LocationTrait; | ||
use Digia\GraphQL\Language\AST\Node\Behavior\NameTrait; | ||
use Digia\GraphQL\Language\AST\Node\Behavior\ValueTrait; | ||
use Digia\GraphQL\Language\AST\Node\Contract\NodeInterface; | ||
use Digia\GraphQL\ConfigObject; | ||
|
||
class ArgumentNode extends ConfigObject implements NodeInterface | ||
{ | ||
|
||
use KindTrait; | ||
use LocationTrait; | ||
use NameTrait; | ||
use ValueTrait; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $kind = KindEnum::ARGUMENT; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\NameNode; | ||
|
||
trait AliasTrait | ||
{ | ||
|
||
/** | ||
* @var ?NameNode | ||
*/ | ||
protected $alias; | ||
|
||
/** | ||
* @return NameNode|null | ||
*/ | ||
public function getName(): ?NameNode | ||
{ | ||
return $this->alias; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\InputValueDefinitionNode; | ||
|
||
trait ArgumentsTrait | ||
{ | ||
|
||
/** | ||
* @var InputValueDefinitionNode[] | ||
*/ | ||
protected $arguments; | ||
|
||
/** | ||
* @return InputValueDefinitionNode[] | ||
*/ | ||
public function getArguments(): array | ||
{ | ||
return $this->arguments; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\Contract\ValueNodeInterface; | ||
|
||
trait DefaultValueTrait | ||
{ | ||
|
||
/** | ||
* @var ValueNodeInterface | ||
*/ | ||
protected $defaultValue; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getDefaultValue(): string | ||
{ | ||
return $this->defaultValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
trait DescriptionTrait | ||
{ | ||
|
||
/** | ||
* @var ?string | ||
*/ | ||
protected $description; | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getDescription() | ||
{ | ||
return $this->description; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\DirectiveNode; | ||
|
||
trait DirectivesTrait | ||
{ | ||
|
||
/** | ||
* @var DirectiveNode[] | ||
*/ | ||
protected $directives; | ||
|
||
/** | ||
* @return DirectiveNode[] | ||
*/ | ||
public function getDirectives(): array | ||
{ | ||
return $this->directives; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\FieldDefinitionNode; | ||
|
||
trait FieldsTrait | ||
{ | ||
|
||
/** | ||
* @var FieldDefinitionNode[] | ||
*/ | ||
protected $fields; | ||
|
||
/** | ||
* @return FieldDefinitionNode[] | ||
*/ | ||
public function getFields(): array | ||
{ | ||
return $this->fields; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\InputValueDefinitionNode; | ||
|
||
trait InputFieldsTrait | ||
{ | ||
|
||
/** | ||
* @var InputValueDefinitionNode[] | ||
*/ | ||
protected $fields; | ||
|
||
/** | ||
* @return InputValueDefinitionNode[] | ||
*/ | ||
public function getFields(): array | ||
{ | ||
return $this->fields; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\NamedTypeNode; | ||
|
||
trait InterfacesTrait | ||
{ | ||
|
||
/** | ||
* @var NamedTypeNode[] | ||
*/ | ||
protected $interfaces; | ||
|
||
/** | ||
* @return NamedTypeNode[] | ||
*/ | ||
public function getInterfaces(): array | ||
{ | ||
return $this->interfaces; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
trait KindTrait | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $kind; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getKind(): string | ||
{ | ||
return $this->kind; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Location; | ||
|
||
trait LocationTrait | ||
{ | ||
|
||
/** | ||
* @var ?Location | ||
*/ | ||
protected $location; | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getLocation(): ?Location | ||
{ | ||
return $this->location; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\NameNode; | ||
|
||
trait NameTrait | ||
{ | ||
|
||
/** | ||
* @var NameNode | ||
*/ | ||
protected $name; | ||
|
||
/** | ||
* @return NameNode | ||
*/ | ||
public function getName(): NameNode | ||
{ | ||
return $this->name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Digia\GraphQL\Language\AST\Node\Behavior; | ||
|
||
use Digia\GraphQL\Language\AST\Node\SelectionSetNode; | ||
|
||
trait SelectionSetTrait | ||
{ | ||
|
||
/** | ||
* @var SelectionSetNode | ||
*/ | ||
protected $selectionSet; | ||
|
||
/** | ||
* @return SelectionSetNode | ||
*/ | ||
public function getSelectionSet(): SelectionSetNode | ||
{ | ||
return $this->selectionSet; | ||
} | ||
} |
Oops, something went wrong.