Go\Aop\Pointcut\FunctionPointcut::matches PHP Method

matches() public method

Performs matching of point of code
public matches ( mixed $function, mixed $context = null, null | string | object $instance = null, array $arguments = null ) : boolean
$function mixed Specific part of code, can be any Reflection class
$context mixed Related context, can be class or namespace
$instance null | string | object Invocation instance or string for static calls
$arguments array Dynamic arguments for method
return boolean
    public function matches($function, $context = null, $instance = null, array $arguments = null)
    {
        if (!$function instanceof ReflectionFunction) {
            return false;
        }
        return $function->name === $this->functionName || (bool) preg_match("/^{$this->regexp}\$/", $function->name);
    }