hasHooks example


    protected function getHookedMethods(ReflectionClass $class)
    {
        return array_filter(
            $class->getMethods(ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED),
            function DReflectionMethod $method) use ($class) {
                return !$method->isConstructor()
                    && !$method->isFinal()
                    && !$method->isStatic()
                    && !str_starts_with($method->getName(), '__')
                    && $this->hookManager->hasHooks($class->getName()$method->getName());
            }
        );
    }

    /** * @return MethodGenerator */
    protected function createMethodGenerator(ReflectionMethod $method)
    {
        $originalMethod = new MethodReflection(
            $method->getDeclaringClass()->getName(),
            
Home | Imprint | This part of the site doesn't use cookies.