Automattic\WooCommerce\Vendor\GraphQL\Utils
InterfaceImplementations{}
A way to track interface implementations.
Distinguishes between implementations by ObjectTypes and InterfaceTypes.
No Hooks.
Usage
$InterfaceImplementations = new InterfaceImplementations(); // use class methods
Methods
- public __construct(array $objects, array $interfaces)
- public interfaces()
- public objects()
InterfaceImplementations{} InterfaceImplementations{} code WC 10.9.1
class InterfaceImplementations
{
/** @var array<int, ObjectType> */
private $objects;
/** @var array<int, InterfaceType> */
private $interfaces;
/**
* @param array<int, ObjectType> $objects
* @param array<int, InterfaceType> $interfaces
*/
public function __construct(array $objects, array $interfaces)
{
$this->objects = $objects;
$this->interfaces = $interfaces;
}
/** @return array<int, ObjectType> */
public function objects(): array
{
return $this->objects;
}
/** @return array<int, InterfaceType> */
public function interfaces(): array
{
return $this->interfaces;
}
}