addResource() public method

Add an AOP resource to the container
public addResource ( string $resource )
$resource string Path to the resource Resources is used to check the freshness of AOP cache
Esempio n. 1
0
 /**
  * Add resources for kernel
  *
  * @param AspectContainer $container
  */
 protected function addKernelResourcesToContainer(AspectContainer $container)
 {
     $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
     $refClass = new \ReflectionObject($this);
     $container->addResource($trace[1]['file']);
     $container->addResource($refClass->getFileName());
 }