/** * Initializes the aspect kernel. * * @return void */ public function initializeAspectKernel() { $cacheTypes = Mage::app()->useCache(); $aspectKernel = Danslo_Aop_Aspect_Kernel::getInstance(); $aspectKernel->init(array('debug' => Mage::getIsDeveloperMode() || empty($cacheTypes[self::AOP_CACHE_TYPE]), 'cacheDir' => $this->_getCacheDir())); self::$initialized = true; }
/** * Set up AOP tests. * * @return void */ public function setUp() { parent::setUp(); // Make sure the AspectKernel is always initialized. Danslo_Aop_Model_Observer::initializeAspectKernel(); // Because fixtures can change for every test, reconfigure AOP // with possibly new aspects. $kernel = Danslo_Aop_Aspect_Kernel::getInstance(); $kernel->configureAop($kernel->getContainer()); }
/** * Initializes the aspect kernel. * * @return void */ public static function initializeAspectKernel() { if (self::$initialized) { return; } $cacheTypes = Mage::app()->useCache(); $aspectKernel = Danslo_Aop_Aspect_Kernel::getInstance(); $aspectKernel->init(array('debug' => Mage::getIsDeveloperMode() || empty($cacheTypes[self::AOP_CACHE_TYPE]), 'cacheDir' => self::_getCacheDir(), 'excludePaths' => [Mage::getBaseDir() . DS . 'vendor' . DS . 'phpunit', Mage::getBaseDir() . DS . 'app'])); self::$initialized = true; }