Automattic\WooCommerce\Vendor\GraphQL\Type
Schema::getDirective
Returns instance of directive by name.
Method of the class: Schema{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Schema = new Schema(); $Schema->getDirective( $name ): ?Directive;
- $name(string) (required)
- .
Schema::getDirective() Schema::getDirective code WC 10.9.4
public function getDirective(string $name): ?Directive
{
foreach ($this->getDirectives() as $directive) {
if ($directive->name === $name) {
return $directive;
}
}
return null;
}