OperationScaffolder
class OperationScaffolder implements ConfigurationApplier
Provides functionality common to both operation scaffolders. Cannot be a subclass due to their distinct inheritance chains.
Traits
Methods
No description
No description
No description
Gets a map of operation identifiers to their classes
OperationScaffolder constructor.
Adds args to the operation
No description
Sets descriptions of arguments [ 'Email' => 'The email of the user' ]
Sets a single arg description
Sets argument defaults [ 'Featured' => true ]
Sets a default for a single arg
Sets operation arguments as required or not [ 'ID' => true ]
Sets an operation argument as required or not
No description
No description
No description
Type name
No description
No description
No description
No description
No description
Details
in Chainable at line 21
$this
setChainableParent(DataObjectScaffolder|SchemaScaffolder $parent)
Set parent
in Chainable at line 31
DataObjectScaffolder|SchemaScaffolder
end()
at line 59
string
getDescription()
at line 68
OperationScaffolder
setDescription(string $description)
at line 79
static string|null
getClassFromIdentifier(string $name)
at line 90
static string|null
getIdentifier(string|OperationScaffolder $instOrClass)
at line 103
static array
getOperations()
Gets a map of operation identifiers to their classes
at line 124
__construct(string $operationName = null, string $typeName = null, OperationResolver|callable|null $resolver = null)
OperationScaffolder constructor.
at line 148
$this
addArgs(array $argData)
Adds args to the operation
Ex: [ 'MyArg' => 'String!', 'MyOtherArg' => 'Int', 'MyCustomArg' => new InputObjectType([ ]
at line 165
$this
addArg(string $argName, string $typeStr, string $description = null, mixed $defaultValue = null)
at line 182
$this
setArgDescriptions(array $argData)
Sets descriptions of arguments [ 'Email' => 'The email of the user' ]
at line 208
$this
setArgDescription(string $argName, string $description)
Sets a single arg description
at line 221
$this
setArgDefaults(array $argData)
Sets argument defaults [ 'Featured' => true ]
at line 247
$this
setArgDefault(string $argName, mixed $default)
Sets a default for a single arg
at line 260
$this
setArgsRequired(array $argData)
Sets operation arguments as required or not [ 'ID' => true ]
at line 286
OperationScaffolder
setArgRequired(string $argName, boolean $required)
Sets an operation argument as required or not
at line 294
string
getName()
at line 303
$this
setName(string $name)
at line 313
ArrayList
getArgs()
at line 324
$this
setTypeName(string $typeName)
Type name