Loader
Trait (class) used by dependency injection to search for classes found in the namespace.
Table of Contents
- $namespace : string
- $classes : array<string|int, mixed>
- $cleanMethod : string
- $interface : string
- $method : string
- $uciFields : array<string|int, mixed>
- 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'
$uciFields
private
array<string|int, mixed>
$uciFields
= []
Methods
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