/** * 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; }