<?php #patchwork __patchwork__/core/superloader /* * To use eZComponents, setup them using the PEAR method, * then import them in your config.patchwork.php with: * #patchwork __patchwork__/pieces/ezComponents */ Patchwork_Superloader::registerPrefix('ezc', array('adapter_ezc', 'getAutoload'));
protected function tagRequire(&$token) { // Every require|include inside files in the include_path // is preprocessed thanks to Patchwork_Superloader::getProcessedPath(). $token['no-autoload-marker'] = true; if (Patchwork_Superloader::$turbo && $this->dependencies['ConstantExpression']->nextExpressionIsConstant() && false !== ($a = Patchwork_Superloader::getProcessedPath($this->expressionValue, true))) { $token =& $this->getNextToken(); $token[1] = ' ' . self::export($a) . str_repeat("\n", substr_count($token[1], "\n")); } else { $this->unshiftTokens($this->namespace ? array(T_NS_SEPARATOR, '\\') : array(T_WHITESPACE, ' '), array(T_STRING, 'Patchwork_Superloader'), array(T_DOUBLE_COLON, '::'), array(T_STRING, 'getProcessedPath'), '('); $this->exprLevel = -1; $this->register($this->exprCallbacks); } }
<?php // vi: set fenc=utf-8 ts=4 sw=4 et: use Patchwork\PHP\Override as o; // Default settings $CONFIG += array('debug.allowed' => true, 'debug.password' => '', 'turbo' => false); defined('DEBUG') || define('DEBUG', $CONFIG['debug.allowed'] && (!$CONFIG['debug.password'] || isset($_COOKIE['debug_password']) && $CONFIG['debug.password'] == $_COOKIE['debug_password']) ? 1 : 0); DEBUG || error_reporting(E_ALL & ~(E_DEPRECATED | E_USER_DEPRECATED | E_STRICT)); if (Patchwork_Superloader::$turbo = !DEBUG && $CONFIG['turbo']) { spl_autoload_register(array('Patchwork_Superloader', 'loadTurbo'), true, true); if (spl_autoload_unregister(array('Patchwork_Superloader', 'loadAlias'))) { spl_autoload_register(array('Patchwork_Superloader', 'loadAlias'), true, true); } } /**/ if ('\\' === DIRECTORY_SEPARATOR && !function_exists('__patchwork_file_exists')) { if (DEBUG) { // Replace file_exists() on Windows to check if character case is strict Patchwork\FunctionOverride(file_exists, o\WinfsCase, $file); Patchwork\FunctionOverride(is_file, o\WinfsCase, $file); Patchwork\FunctionOverride(is_dir, o\WinfsCase, $file); Patchwork\FunctionOverride(is_link, o\WinfsCase, $file); Patchwork\FunctionOverride(is_executable, o\WinfsCase, $file); Patchwork\FunctionOverride(is_readable, o\WinfsCase, $file); Patchwork\FunctionOverride(is_writable, o\WinfsCase, $file); } /**/ } /**/ boot::$manager->pushFile('config.setup.php');