injectAspectRegister() public méthode

Inject the aspect register
public injectAspectRegister ( AppserverIo\Doppelgaenger\AspectRegister $aspectRegister ) : null
$aspectRegister AppserverIo\Doppelgaenger\AspectRegister The aspect register instance
Résultat null
 /**
  * The main method that creates new instances in a separate context.
  *
  * @param \AppserverIo\Psr\Application\ApplicationInterface|\AppserverIo\Psr\Naming\NamingDirectoryInterface $application          The application instance to register the class loader with
  * @param \AppserverIo\Appserver\Core\Api\Node\ManagerNodeInterface                                          $managerConfiguration The manager configuration
  *
  * @return void
  */
 public static function visit(ApplicationInterface $application, ManagerNodeInterface $managerConfiguration)
 {
     // check if the correct autoloader has been registered, if so we have to get its aspect register.
     // if not we have to fail here
     $classLoader = $application->search('DgClassLoader');
     $aspectRegister = $classLoader->getAspectRegister();
     // initialize the aspect manager
     $aspectManager = new AspectManager();
     $aspectManager->injectApplication($application);
     $aspectManager->injectAspectRegister($aspectRegister);
     // attach the instance
     $application->addManager($aspectManager, $managerConfiguration);
 }
 /**
  * Initializes the test class instance to test
  *
  * @return null
  */
 public function setUp()
 {
     $this->testClass = new AspectManager();
     $this->testClass->injectAspectRegister(new AspectRegister());
 }