public function load(Aspect $aspect): array
    {
        $loadedItems = [];
        $refAspect   = new \ReflectionClass($aspect);

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_CLASS])) {
            $loadedItems += $this->loadFrom($aspect, $refAspect, $this->loaders[AspectLoaderExtension::TARGET_CLASS]);
        }

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_METHOD])) {
            $refMethods = $refAspect->getMethods();
            foreach ($refMethods as $refMethod) {
                $loadedItems += $this->loadFrom($aspect, $refMethod, $this->loaders[AspectLoaderExtension::TARGET_METHOD]);
            }
        }

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_PROPERTY])) {
            $refProperties = $refAspect->getProperties();
            foreach ($refProperties as $refProperty) {
                $loadedItems += $this->loadFrom($aspect, $refProperty, $this->loaders[AspectLoaderExtension::TARGET_PROPERTY]);
            }
        }

        return $loadedItems;
    }
public function load(Aspect $aspect): array
    {
        $loadedItems = [];
        $refAspect   = new \ReflectionClass($aspect);

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_CLASS])) {
            $loadedItems += $this->loadFrom($aspect, $refAspect, $this->loaders[AspectLoaderExtension::TARGET_CLASS]);
        }

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_METHOD])) {
            $refMethods = $refAspect->getMethods();
            foreach ($refMethods as $refMethod) {
                $loadedItems += $this->loadFrom($aspect, $refMethod, $this->loaders[AspectLoaderExtension::TARGET_METHOD]);
            }
        }

        if (!empty($this->loaders[AspectLoaderExtension::TARGET_PROPERTY])) {
            $refProperties = $refAspect->getProperties();
            foreach ($refProperties as $refProperty) {
                $loadedItems += $this->loadFrom($aspect, $refProperty, $this->loaders[AspectLoaderExtension::TARGET_PROPERTY]);
            }
        }

        return $loadedItems;
    }
public function load ( Aspect $ aspect ) : array { $ loadedItems = [ ] ; $ refAspect = new \ ReflectionClass ( $ aspect ) ; if ( ! empty ( $ this -> loaders [ AspectLoaderExtension :: TARGET_CLASS ] ) ) { $ loadedItems += $ this -> loadFrom ( $ aspect , $ refAspect , $ this -> loaders [ AspectLoaderExtension :: TARGET_CLASS ] ) ; } if ( ! empty ( $ this -> loaders [ AspectLoaderExtension :: TARGET_METHOD ] ) ) { $ refMethods = $ refAspect -> getMethods ( ) ; foreach ( $ refMethods as $ refMethod ) { $ loadedItems += $ this -> loadFrom ( $ aspect , $ refMethod , $ this -> loaders [ AspectLoaderExtension :: TARGET_METHOD ] ) ; } } if ( ! empty ( $ this -> loaders [ AspectLoaderExtension :: TARGET_PROPERTY ] ) ) { $ refProperties = $ refAspect -> getProperties ( ) ; foreach ( $ refProperties as $ refProperty ) { $ loadedItems += $ this -> loadFrom ( $ aspect , $ refProperty , $ this -> loaders [ AspectLoaderExtension :: TARGET_PROPERTY ] ) ; } } return $ loadedItems ; }
Loads an aspect with the help of aspect loaders, but don't register it in the container

@see loadAndRegister() method for registration

@return Pointcut[]|Advisor[]
Loads an aspect with the help of aspect loaders but don t register it in the container