Go\Aop\Support\SimpleNamespaceFilter::matches PHP Method

matches() public method

public matches ( Go\ParserReflection\ReflectionFileNamespace | string $ns, $context = null, $instance = null, array $arguments = null )
$ns Go\ParserReflection\ReflectionFileNamespace | string
$arguments array
    public function matches($ns, $context = null, $instance = null, array $arguments = null)
    {
        $isNamespaceIsObject = $ns === (object) $ns;
        if ($isNamespaceIsObject && !$ns instanceof ReflectionFileNamespace) {
            return false;
        }
        $nsName = $isNamespaceIsObject ? $ns->getName() : $ns;
        return $nsName === $this->nsName || (bool) preg_match("/^(?:{$this->regexp})\$/", $nsName);
    }