Go\Proxy\ClassProxy::addInterface PHP Method

addInterface() public method

Add an interface for child
public addInterface ( string | ReflectionClas\ReflectionClass $interface )
$interface string | ReflectionClas\ReflectionClass
    public function addInterface($interface)
    {
        $interfaceName = $interface;
        if ($interface instanceof ReflectionClass) {
            if (!$interface->isInterface()) {
                throw new \InvalidArgumentException("Interface expected to add");
            }
            $interfaceName = $interface->name;
        }
        // Use absolute namespace to prevent NS-conflicts
        $this->interfaces[] = '\\' . ltrim($interfaceName, '\\');
    }