/** * Constructor, take Core object as param * @param Core $core */ public function __construct(Core $core) { $this->core = $core; $this->corePluginDir = Core::DWOO_DIRECTORY . DIRECTORY_SEPARATOR . 'Plugins'; $this->cacheDir = rtrim($core->getCompileDir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; // include class paths or rebuild paths if the cache file isn't there $cacheFile = $this->cacheDir . 'classpath.cache.d' . Core::RELEASE_TAG . '.php'; if (file_exists($cacheFile)) { $classpath = file_get_contents($cacheFile); $this->classPath = unserialize($classpath) + $this->classPath; } else { $this->rebuildClassPathCache($this->corePluginDir, $cacheFile); } }
/** * returns the full compiled file name and assigns a default value to it if * required * * @param Core $dwoo the dwoo instance that requests the file name * * @return string the full path to the compiled file */ protected function getCompiledFilename(Core $dwoo) { // no compile id was provided, set default if ($this->compileId === null) { $this->compileId = str_replace('../', '__', strtr($this->getResourceIdentifier(), '\\:', '/-')); } return $dwoo->getCompileDir() . $this->compileId . '.d' . Core::RELEASE_TAG . '.php'; }
/** * returns the full compiled file name and assigns a default value to it if * required * * @param Core $dwoo the dwoo instance that requests the file name * * @return string the full path to the compiled file */ protected function getCompiledFilename(Core $dwoo) { // no compile id was provided, set default if ($this->compileId === null) { $this->compileId = $this->name; } return $dwoo->getCompileDir() . $this->compileId . '.d' . Core::RELEASE_TAG . '.php'; }