Go\Core\AspectContainer::getResources PHP Method

getResources() public method

Returns the list of AOP resources
public getResources ( ) : array
return array
    public function getResources();

Usage Example

Beispiel #1
0
 /**
  * Load pointcuts into container
  *
  * There is no need to always load pointcuts, so we delay loading
  */
 public function loadAdvisorsAndPointcuts()
 {
     $containerResources = $this->container->getResources();
     $resourcesToLoad = array_diff($containerResources, $this->loadedResources);
     if (!$resourcesToLoad) {
         return;
     }
     foreach ($this->container->getByTag('aspect') as $aspect) {
         $ref = new ReflectionClass($aspect);
         if (in_array($ref->getFileName(), $resourcesToLoad)) {
             $this->load($aspect);
         }
     }
     $this->loadedResources = $containerResources;
 }