protected function _includeControllerClass($controllerFileName, $controllerClassName) { if (Extendware_EWCore_Model_Autoload::isOverridden($controllerClassName)) { try { $controllerFileName = Extendware_EWCore_Model_Autoload::getIncludeFileFor($controllerClassName); } catch (Exception $e) { Mage::logException($e); } } return parent::_includeControllerClass($controllerFileName, $controllerClassName); }
protected function _getClassesSourceCode($classes, $scope) { $sortedClasses = array(); foreach ($classes as $className) { if (class_exists($className) === false) { continue; } $implements = array_reverse(class_implements($className)); foreach ($implements as $class) { if (!in_array($class, $sortedClasses) && !in_array($class, $this->_processedClasses) && strstr($class, '_')) { $sortedClasses[] = $class; if ($scope == 'default') { $this->_processedClasses[] = $class; } } } $extends = array_reverse(class_parents($className)); foreach ($extends as $class) { if (!in_array($class, $sortedClasses) && !in_array($class, $this->_processedClasses) && strstr($class, '_')) { $sortedClasses[] = $class; if ($scope == 'default') { $this->_processedClasses[] = $class; } } } if (!in_array($className, $sortedClasses) && !in_array($className, $this->_processedClasses)) { $sortedClasses[] = $className; if ($scope == 'default') { $this->_processedClasses[] = $className; } } } // remove all the classes that are included in the overridden classes include file (created by extendware ewcore) $sortedClasses = $this->removeOverriddenClasses($sortedClasses, array('search_alias', 'replace', 'bridge')); $classesSource = "<?php\n"; foreach ($sortedClasses as $className) { $file = null; if ($this->isAffectedOverriddenSearchClass($className)) { $file = Extendware_EWCore_Model_Autoload::getIncludeFileFor($className); } else { $file = $this->_includeDir . DS . $className . '.php'; } if (!file_exists($file)) { continue; } $content = file_get_contents($file); $content = ltrim($content, '<?php'); $content = rtrim($content, "\n\r\t?>"); $content = $this->wrapClass($className, $content, $scope); $classesSource .= $content; } return $classesSource; }
list($name, $value) = explode('=', rtrim($pair, ';'), 2); $cookies[$name] = rawurldecode($value); } return $cookies; }; $files = array(BP . '/app/code/local/Extendware/EWCore/Model/Autoload.php', BP . '/app/code/community/Extendware/EWCore/Model/Autoload.php'); foreach ($files as $file) { if (is_file($file)) { include_once $file; break; } } if (class_exists('Extendware_EWCore_Model_Autoload', false) === false) { exit; } $autoloader = new Extendware_EWCore_Model_Autoload(); spl_autoload_register(array($autoloader, 'autoload')); if (ini_get('apc.stat') != '' and !ini_get('apc.stat') or ini_get('eaccelerator.check_mtime') != '' and !ini_get('eaccelerator.check_mtime')) { $autoloader->setOption('force_php_evaluation', true); } $autoloader->setOption('can_load_all', true); $config = new Extendware_EWPageCache_Helper_Config(); $configFile = $config->getFallbackStoragePath(); $lastWroteConfig = @filemtime($configFile); $isEnabled = $expiration = $segmentableUseragents = $segmentableCookies = $isParameterSortingEnabled = $ignoredParameters = $isVirtualKeysEnabled = null; $updateConfigFunc($isEnabled, $expiration, $segmentableUseragents, $segmentableCookies, $isParameterSortingEnabled, $ignoredParameters, $isVirtualKeysEnabled); $toEval = null; $selfModifiedTime = filemtime(CURRENT_FILE); $lastClearStatCache = time(); $handle = fopen('php://stdin', 'r'); while ($line = fgets($handle)) {
} if (defined('BP') === false) { define('BP', dirname(dirname(dirname(dirname(dirname(__FILE__)))))); } __ewDependencyCheck(); // we always must do this if compilation is enabled due to the double declaration of Zend_Cache_Backend otherwise if (defined('COMPILER_INCLUDE_PATH') === true or class_exists('Extendware_EWCore_Model_Autoload') === false) { if (defined('COMPILER_INCLUDE_PATH')) { include_once COMPILER_INCLUDE_PATH . DS . 'Varien/Autoload.php'; } else { include_once BP . DS . 'lib/Varien/Autoload.php'; } Varien_Autoload::register(); } // get our custom auto loader $autoloader = new Extendware_EWCore_Model_Autoload(); // you can set this to false and it will increase performance. you will need to ensure that you // clear extendware core cache whenever you edit files (edit core files, update extensions, etc). // $autoloader->setOption('check_mtime', false); // set this to true if you want Extendware code to be loaded from a mounted ram disk // you will need to the disk at [magento root]/var/extendware/system/memfs/ using something // like mount -t tmpfs -o size=20M tmpfs [magento root]/var/extendware/system/memfs/ // doing this can further increase performance of Extendware extensions. if you do not know // how to mount a tmpfs or understand how it could be beneficial, then you should leave this commented // $autoloader->setOption('use_memfs', true); // use this to use [magento root]/var/extendware/system/memfs/ for override files whether. // this is mostly useful only if memfs directory is a mounted ram disk. this has the potential // to speed some information such as checking mtime or existence of the file // $autoloader->setOption('use_memfs_for_overrides', true); // use this to use [magento root]/var/extendware/system/memfs/ for override files whether. // this is mostly useful only if memfs directory is a mounted ram disk. this has the potential