QueryType
extends ObjectType
in package
Uses
Loader
Class used for the global queries in GraphQL.
Table of Contents
- $namespace : string
- $classes : array<string|int, mixed>
- $cleanMethod : string
- $interface : string
- $method : string
- $query : QueryType|null
- Global instance in all the aplication.
- $uciFields : array<string|int, mixed>
- clean() : void
- Clean the query builded.
- query() : QueryType
- Return the global instance for the queries in GraphQL.
- __construct() : mixed
- We use a private construct method for prevent instances Its called as singleton pattern.
- cleanField() : void
- Return the invoke clean method in that class.
- cleanFields() : void
- Clean all fields.
- getResultClass() : array<string|int, mixed>
- Return the invoke method in that class.
- isCorrectClass() : bool
- Validate if the class complete the specifications.
- searchFields() : void
- This function load all classes using this namespace, Call each one using specific method Load $fields and $classes attributes with his information.
Properties
$namespace
protected
static string
$namespace
= __NAMESPACE__
$classes
private
array<string|int, mixed>
$classes
= []
$cleanMethod
private
static string
$cleanMethod
= 'clean'
$interface
private
static string
$interface
= \UciGraphQL\ILoader::class
$method
private
static string
$method
= 'getFields'
$query
Global instance in all the aplication.
private
static QueryType|null
$query
= null
$uciFields
private
array<string|int, mixed>
$uciFields
= []
Methods
clean()
Clean the query builded.
public
static clean() : void
Return values
void —query()
Return the global instance for the queries in GraphQL.
public
static query([array<string|int, mixed> $customFields = [] ]) : QueryType
Parameters
- $customFields : array<string|int, mixed> = []
Return values
QueryType —__construct()
We use a private construct method for prevent instances Its called as singleton pattern.
private
__construct([array<string|int, mixed> $customFields = [] ]) : mixed
Parameters
- $customFields : array<string|int, mixed> = []
Return values
mixed —cleanField()
Return the invoke clean method in that class.
private
static cleanField(string $class) : void
Parameters
- $class : string
Return values
void —cleanFields()
Clean all fields.
private
static cleanFields() : void
Return values
void —getResultClass()
Return the invoke method in that class.
private
getResultClass(string $class) : array<string|int, mixed>
Parameters
- $class : string
Return values
array<string|int, mixed> —isCorrectClass()
Validate if the class complete the specifications.
private
static isCorrectClass(string $class) : bool
Parameters
- $class : string
Return values
bool —searchFields()
This function load all classes using this namespace, Call each one using specific method Load $fields and $classes attributes with his information.
private
searchFields() : void