123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- <?php
- /*
- * This file is part of the symfony package.
- * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- /**
- * The current symfony version.
- */
- define('SYMFONY_VERSION', '1.2.6');
- /**
- * sfCoreAutoload class.
- *
- * This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances
- * of the same class (why?).
- *
- * @package symfony
- * @subpackage autoload
- * @author Fabien Potencier <fabien.potencier@symfony-project.com>
- * @version SVN: $Id: sfCoreAutoload.class.php 17682 2009-04-27 15:24:21Z fabien $
- */
- class sfCoreAutoload
- {
- static protected
- $registered = false,
- $instance = null;
- protected
- $baseDir = '';
- protected function __construct()
- {
- $this->baseDir = realpath(dirname(__FILE__).'/..').'/';
- }
- /**
- * Retrieves the singleton instance of this class.
- *
- * @return sfCoreAutoload A sfCoreAutoload implementation instance.
- */
- static public function getInstance()
- {
- if (!isset(self::$instance))
- {
- self::$instance = new sfCoreAutoload();
- }
- return self::$instance;
- }
- /**
- * Register sfCoreAutoload in spl autoloader.
- *
- * @return void
- */
- static public function register()
- {
- if (self::$registered)
- {
- return;
- }
- ini_set('unserialize_callback_func', 'spl_autoload_call');
- if (false === spl_autoload_register(array(self::getInstance(), 'autoload')))
- {
- throw new sfException(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInstance())));
- }
- self::$registered = true;
- }
- /**
- * Unregister sfCoreAutoload from spl autoloader.
- *
- * @return void
- */
- static public function unregister()
- {
- spl_autoload_unregister(array(self::getInstance(), 'autoload'));
- }
- /**
- * Handles autoloading of classes.
- *
- * @param string $class A class name.
- *
- * @return boolean Returns true if the class has been loaded
- */
- public function autoload($class)
- {
- if (!isset($this->classes[$class]))
- {
- return false;
- }
- require $this->baseDir.$this->classes[$class].'/'.$class.'.class.php';
- return true;
- }
- /**
- * Returns the base directory this autoloader is working on.
- *
- * @return base directory
- */
- public function getBaseDir()
- {
- return $this->baseDir;
- }
- /**
- * Rebuilds the association array between class names and paths.
- *
- * This method overrides this file (__FILE__)
- */
- static public function make()
- {
- $libDir = str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'));
- require_once $libDir.'/util/sfFinder.class.php';
- $files = sfFinder::type('file')
- ->prune('plugins')
- ->prune('vendor')
- ->prune('skeleton')
- ->prune('default')
- ->name('*\.class\.php')
- ->in($libDir)
- ;
- sort($files, SORT_STRING);
- $classes = array();
- foreach ($files as $file)
- {
- $classes[basename($file, '.class.php')] = str_replace($libDir.'/', '', str_replace(DIRECTORY_SEPARATOR, '/', dirname($file)));
- }
- $content = preg_replace('/protected \$classes = array *\(.*?\)/s', 'protected $classes = '.var_export($classes, true), file_get_contents(__FILE__));
- file_put_contents(__FILE__, $content);
- }
- // Don't edit this property by hand.
- // To update it, use sfCoreAutoload::make()
- protected $classes = array (
- 'sfAction' => 'action',
- 'sfActionStack' => 'action',
- 'sfActionStackEntry' => 'action',
- 'sfActions' => 'action',
- 'sfComponent' => 'action',
- 'sfComponents' => 'action',
- 'sfData' => 'addon',
- 'sfPager' => 'addon',
- 'sfAutoload' => 'autoload',
- 'sfCoreAutoload' => 'autoload',
- 'sfSimpleAutoload' => 'autoload',
- 'sfAPCCache' => 'cache',
- 'sfCache' => 'cache',
- 'sfEAcceleratorCache' => 'cache',
- 'sfFileCache' => 'cache',
- 'sfFunctionCache' => 'cache',
- 'sfMemcacheCache' => 'cache',
- 'sfNoCache' => 'cache',
- 'sfSQLiteCache' => 'cache',
- 'sfXCacheCache' => 'cache',
- 'sfAnsiColorFormatter' => 'command',
- 'sfCommandApplication' => 'command',
- 'sfCommandArgument' => 'command',
- 'sfCommandArgumentSet' => 'command',
- 'sfCommandArgumentsException' => 'command',
- 'sfCommandException' => 'command',
- 'sfCommandLogger' => 'command',
- 'sfCommandManager' => 'command',
- 'sfCommandOption' => 'command',
- 'sfCommandOptionSet' => 'command',
- 'sfFormatter' => 'command',
- 'sfSymfonyCommandApplication' => 'command',
- 'sfApplicationConfiguration' => 'config',
- 'sfAutoloadConfigHandler' => 'config',
- 'sfCacheConfigHandler' => 'config',
- 'sfCompileConfigHandler' => 'config',
- 'sfConfig' => 'config',
- 'sfConfigCache' => 'config',
- 'sfConfigHandler' => 'config',
- 'sfDatabaseConfigHandler' => 'config',
- 'sfDefineEnvironmentConfigHandler' => 'config',
- 'sfFactoryConfigHandler' => 'config',
- 'sfFilterConfigHandler' => 'config',
- 'sfGeneratorConfigHandler' => 'config',
- 'sfLoader' => 'config',
- 'sfPluginConfiguration' => 'config',
- 'sfPluginConfigurationGeneric' => 'config',
- 'sfProjectConfiguration' => 'config',
- 'sfRootConfigHandler' => 'config',
- 'sfRoutingConfigHandler' => 'config',
- 'sfSecurityConfigHandler' => 'config',
- 'sfSimpleYamlConfigHandler' => 'config',
- 'sfViewConfigHandler' => 'config',
- 'sfYamlConfigHandler' => 'config',
- 'sfConsoleController' => 'controller',
- 'sfController' => 'controller',
- 'sfFrontWebController' => 'controller',
- 'sfWebController' => 'controller',
- 'sfDatabase' => 'database',
- 'sfDatabaseManager' => 'database',
- 'sfMySQLDatabase' => 'database',
- 'sfMySQLiDatabase' => 'database',
- 'sfPDODatabase' => 'database',
- 'sfPostgreSQLDatabase' => 'database',
- 'sfDebug' => 'debug',
- 'sfTimer' => 'debug',
- 'sfTimerManager' => 'debug',
- 'sfWebDebug' => 'debug',
- 'sfWebDebugPanel' => 'debug',
- 'sfWebDebugPanelCache' => 'debug',
- 'sfWebDebugPanelConfig' => 'debug',
- 'sfWebDebugPanelLogs' => 'debug',
- 'sfWebDebugPanelMemory' => 'debug',
- 'sfWebDebugPanelSymfonyVersion' => 'debug',
- 'sfWebDebugPanelTimer' => 'debug',
- 'sfEvent' => 'event',
- 'sfEventDispatcher' => 'event',
- 'sfCacheException' => 'exception',
- 'sfConfigurationException' => 'exception',
- 'sfControllerException' => 'exception',
- 'sfDatabaseException' => 'exception',
- 'sfError404Exception' => 'exception',
- 'sfException' => 'exception',
- 'sfFactoryException' => 'exception',
- 'sfFileException' => 'exception',
- 'sfFilterException' => 'exception',
- 'sfForwardException' => 'exception',
- 'sfInitializationException' => 'exception',
- 'sfParseException' => 'exception',
- 'sfRenderException' => 'exception',
- 'sfSecurityException' => 'exception',
- 'sfStopException' => 'exception',
- 'sfStorageException' => 'exception',
- 'sfViewException' => 'exception',
- 'sfBasicSecurityFilter' => 'filter',
- 'sfCacheFilter' => 'filter',
- 'sfCommonFilter' => 'filter',
- 'sfExecutionFilter' => 'filter',
- 'sfFilter' => 'filter',
- 'sfFilterChain' => 'filter',
- 'sfRenderingFilter' => 'filter',
- 'sfForm' => 'form',
- 'sfFormField' => 'form',
- 'sfFormFieldSchema' => 'form',
- 'sfFormFilter' => 'form',
- 'sfAdminGenerator' => 'generator',
- 'sfCrudGenerator' => 'generator',
- 'sfGenerator' => 'generator',
- 'sfGeneratorManager' => 'generator',
- 'sfModelGenerator' => 'generator',
- 'sfModelGeneratorConfiguration' => 'generator',
- 'sfModelGeneratorConfigurationField' => 'generator',
- 'sfModelGeneratorHelper' => 'generator',
- 'sfRichTextEditor' => 'helper',
- 'sfRichTextEditorFCK' => 'helper',
- 'sfRichTextEditorTinyMCE' => 'helper',
- 'TGettext' => 'i18n/Gettext',
- 'sfI18nApplicationExtract' => 'i18n/extract',
- 'sfI18nExtract' => 'i18n/extract',
- 'sfI18nExtractorInterface' => 'i18n/extract',
- 'sfI18nModuleExtract' => 'i18n/extract',
- 'sfI18nPhpExtractor' => 'i18n/extract',
- 'sfI18nYamlExtractor' => 'i18n/extract',
- 'sfI18nYamlGeneratorExtractor' => 'i18n/extract',
- 'sfI18nYamlValidateExtractor' => 'i18n/extract',
- 'sfChoiceFormat' => 'i18n',
- 'sfCultureInfo' => 'i18n',
- 'sfDateFormat' => 'i18n',
- 'sfDateTimeFormatInfo' => 'i18n',
- 'sfI18N' => 'i18n',
- 'sfIMessageSource' => 'i18n',
- 'sfMessageFormat' => 'i18n',
- 'sfMessageSource' => 'i18n',
- 'sfMessageSource_Aggregate' => 'i18n',
- 'sfMessageSource_Database' => 'i18n',
- 'sfMessageSource_File' => 'i18n',
- 'sfMessageSource_MySQL' => 'i18n',
- 'sfMessageSource_SQLite' => 'i18n',
- 'sfMessageSource_XLIFF' => 'i18n',
- 'sfMessageSource_gettext' => 'i18n',
- 'sfNumberFormat' => 'i18n',
- 'sfNumberFormatInfo' => 'i18n',
- 'sfAggregateLogger' => 'log',
- 'sfConsoleLogger' => 'log',
- 'sfFileLogger' => 'log',
- 'sfLogger' => 'log',
- 'sfLoggerInterface' => 'log',
- 'sfLoggerWrapper' => 'log',
- 'sfNoLogger' => 'log',
- 'sfStreamLogger' => 'log',
- 'sfVarLogger' => 'log',
- 'sfWebDebugLogger' => 'log',
- 'sfPearDownloader' => 'plugin',
- 'sfPearEnvironment' => 'plugin',
- 'sfPearFrontendPlugin' => 'plugin',
- 'sfPearRest' => 'plugin',
- 'sfPearRest10' => 'plugin',
- 'sfPearRest11' => 'plugin',
- 'sfPearRestPlugin' => 'plugin',
- 'sfPluginDependencyException' => 'plugin',
- 'sfPluginException' => 'plugin',
- 'sfPluginManager' => 'plugin',
- 'sfPluginRecursiveDependencyException' => 'plugin',
- 'sfPluginRestException' => 'plugin',
- 'sfSymfonyPluginManager' => 'plugin',
- 'sfConsoleRequest' => 'request',
- 'sfRequest' => 'request',
- 'sfWebRequest' => 'request',
- 'sfConsoleResponse' => 'response',
- 'sfResponse' => 'response',
- 'sfWebResponse' => 'response',
- 'sfNoRouting' => 'routing',
- 'sfObjectRoute' => 'routing',
- 'sfObjectRouteCollection' => 'routing',
- 'sfPathInfoRouting' => 'routing',
- 'sfPatternRouting' => 'routing',
- 'sfRequestRoute' => 'routing',
- 'sfRoute' => 'routing',
- 'sfRouteCollection' => 'routing',
- 'sfRouting' => 'routing',
- 'sfCacheSessionStorage' => 'storage',
- 'sfDatabaseSessionStorage' => 'storage',
- 'sfMySQLSessionStorage' => 'storage',
- 'sfMySQLiSessionStorage' => 'storage',
- 'sfNoStorage' => 'storage',
- 'sfPDOSessionStorage' => 'storage',
- 'sfPostgreSQLSessionStorage' => 'storage',
- 'sfSessionStorage' => 'storage',
- 'sfSessionTestStorage' => 'storage',
- 'sfStorage' => 'storage',
- 'sfAppRoutesTask' => 'task/app',
- 'sfCacheClearTask' => 'task/cache',
- 'sfConfigureAuthorTask' => 'task/configure',
- 'sfConfigureDatabaseTask' => 'task/configure',
- 'sfGenerateAppTask' => 'task/generator',
- 'sfGenerateModuleTask' => 'task/generator',
- 'sfGenerateProjectTask' => 'task/generator',
- 'sfGenerateTaskTask' => 'task/generator',
- 'sfGeneratorBaseTask' => 'task/generator',
- 'sfHelpTask' => 'task/help',
- 'sfListTask' => 'task/help',
- 'sfI18nExtractTask' => 'task/i18n',
- 'sfI18nFindTask' => 'task/i18n',
- 'sfLogClearTask' => 'task/log',
- 'sfLogRotateTask' => 'task/log',
- 'sfPluginAddChannelTask' => 'task/plugin',
- 'sfPluginBaseTask' => 'task/plugin',
- 'sfPluginInstallTask' => 'task/plugin',
- 'sfPluginListTask' => 'task/plugin',
- 'sfPluginPublishAssetsTask' => 'task/plugin',
- 'sfPluginUninstallTask' => 'task/plugin',
- 'sfPluginUpgradeTask' => 'task/plugin',
- 'sfProjectClearControllersTask' => 'task/project',
- 'sfProjectDeployTask' => 'task/project',
- 'sfProjectDisableTask' => 'task/project',
- 'sfProjectEnableTask' => 'task/project',
- 'sfProjectFreezeTask' => 'task/project',
- 'sfProjectPermissionsTask' => 'task/project',
- 'sfProjectUnfreezeTask' => 'task/project',
- 'sfUpgradeTo11Task' => 'task/project',
- 'sfUpgradeTo12Task' => 'task/project',
- 'sfComponentUpgrade' => 'task/project/upgrade1.1',
- 'sfConfigFileUpgrade' => 'task/project/upgrade1.1',
- 'sfConfigUpgrade' => 'task/project/upgrade1.1',
- 'sfEnvironmentUpgrade' => 'task/project/upgrade1.1',
- 'sfFactoriesUpgrade' => 'task/project/upgrade1.1',
- 'sfFlashUpgrade' => 'task/project/upgrade1.1',
- 'sfLayoutUpgrade' => 'task/project/upgrade1.1',
- 'sfLoggerUpgrade' => 'task/project/upgrade1.1',
- 'sfPropelUpgrade' => 'task/project/upgrade1.1',
- 'sfSettingsUpgrade' => 'task/project/upgrade1.1',
- 'sfSingletonUpgrade' => 'task/project/upgrade1.1',
- 'sfTestUpgrade' => 'task/project/upgrade1.1',
- 'sfUpgrade' => 'task/project/upgrade1.1',
- 'sfViewCacheManagerUpgrade' => 'task/project/upgrade1.1',
- 'sfWebDebugUpgrade' => 'task/project/upgrade1.1',
- 'sfConfigurationUpgrade' => 'task/project/upgrade1.2',
- 'sfFactories12Upgrade' => 'task/project/upgrade1.2',
- 'sfPluginAssetsUpgrade' => 'task/project/upgrade1.2',
- 'sfPropel13Upgrade' => 'task/project/upgrade1.2',
- 'sfPropelIniUpgrade' => 'task/project/upgrade1.2',
- 'sfBaseTask' => 'task',
- 'sfCommandApplicationTask' => 'task',
- 'sfFilesystem' => 'task',
- 'sfTask' => 'task',
- 'sfTestAllTask' => 'task/test',
- 'sfTestCoverageTask' => 'task/test',
- 'sfTestFunctionalTask' => 'task/test',
- 'sfTestUnitTask' => 'task/test',
- 'sfTestBrowser' => 'test',
- 'sfTestFunctional' => 'test',
- 'sfTestFunctionalBase' => 'test',
- 'sfTester' => 'test',
- 'sfTesterForm' => 'test',
- 'sfTesterRequest' => 'test',
- 'sfTesterResponse' => 'test',
- 'sfTesterUser' => 'test',
- 'sfTesterViewCache' => 'test',
- 'sfBasicSecurityUser' => 'user',
- 'sfSecurityUser' => 'user',
- 'sfUser' => 'user',
- 'sfBrowser' => 'util',
- 'sfBrowserBase' => 'util',
- 'sfCallable' => 'util',
- 'sfContext' => 'util',
- 'sfDomCssSelector' => 'util',
- 'sfFinder' => 'util',
- 'sfInflector' => 'util',
- 'sfNamespacedParameterHolder' => 'util',
- 'sfParameterHolder' => 'util',
- 'sfToolkit' => 'util',
- 'sfValidatorI18nChoiceCountry' => 'validator/i18n',
- 'sfValidatorI18nChoiceLanguage' => 'validator/i18n',
- 'sfValidatorAnd' => 'validator',
- 'sfValidatorBase' => 'validator',
- 'sfValidatorBoolean' => 'validator',
- 'sfValidatorCSRFToken' => 'validator',
- 'sfValidatorCallback' => 'validator',
- 'sfValidatorChoice' => 'validator',
- 'sfValidatorChoiceMany' => 'validator',
- 'sfValidatorDate' => 'validator',
- 'sfValidatorDateRange' => 'validator',
- 'sfValidatorDateTime' => 'validator',
- 'sfValidatorDecorator' => 'validator',
- 'sfValidatorEmail' => 'validator',
- 'sfValidatorError' => 'validator',
- 'sfValidatorErrorSchema' => 'validator',
- 'sfValidatorFile' => 'validator',
- 'sfValidatorFromDescription' => 'validator',
- 'sfValidatorInteger' => 'validator',
- 'sfValidatorNumber' => 'validator',
- 'sfValidatorOr' => 'validator',
- 'sfValidatorPass' => 'validator',
- 'sfValidatorRegex' => 'validator',
- 'sfValidatorSchema' => 'validator',
- 'sfValidatorSchemaCompare' => 'validator',
- 'sfValidatorSchemaFilter' => 'validator',
- 'sfValidatorSchemaForEach' => 'validator',
- 'sfValidatorString' => 'validator',
- 'sfValidatorTime' => 'validator',
- 'sfValidatorUrl' => 'validator',
- 'sfOutputEscaper' => 'view/escaper',
- 'sfOutputEscaperArrayDecorator' => 'view/escaper',
- 'sfOutputEscaperGetterDecorator' => 'view/escaper',
- 'sfOutputEscaperIteratorDecorator' => 'view/escaper',
- 'sfOutputEscaperObjectDecorator' => 'view/escaper',
- 'sfOutputEscaperSafe' => 'view/escaper',
- 'sfPHPView' => 'view',
- 'sfPartialView' => 'view',
- 'sfView' => 'view',
- 'sfViewCacheManager' => 'view',
- 'sfViewParameterHolder' => 'view',
- 'sfWidgetFormI18nDate' => 'widget/i18n',
- 'sfWidgetFormI18nDateTime' => 'widget/i18n',
- 'sfWidgetFormI18nSelectCountry' => 'widget/i18n',
- 'sfWidgetFormI18nSelectCurrency' => 'widget/i18n',
- 'sfWidgetFormI18nSelectLanguage' => 'widget/i18n',
- 'sfWidgetFormI18nTime' => 'widget/i18n',
- 'sfWidget' => 'widget',
- 'sfWidgetForm' => 'widget',
- 'sfWidgetFormChoice' => 'widget',
- 'sfWidgetFormChoiceMany' => 'widget',
- 'sfWidgetFormDate' => 'widget',
- 'sfWidgetFormDateRange' => 'widget',
- 'sfWidgetFormDateTime' => 'widget',
- 'sfWidgetFormFilterDate' => 'widget',
- 'sfWidgetFormFilterInput' => 'widget',
- 'sfWidgetFormInput' => 'widget',
- 'sfWidgetFormInputCheckbox' => 'widget',
- 'sfWidgetFormInputFile' => 'widget',
- 'sfWidgetFormInputFileEditable' => 'widget',
- 'sfWidgetFormInputHidden' => 'widget',
- 'sfWidgetFormInputPassword' => 'widget',
- 'sfWidgetFormSchema' => 'widget',
- 'sfWidgetFormSchemaDecorator' => 'widget',
- 'sfWidgetFormSchemaForEach' => 'widget',
- 'sfWidgetFormSchemaFormatter' => 'widget',
- 'sfWidgetFormSchemaFormatterList' => 'widget',
- 'sfWidgetFormSchemaFormatterTable' => 'widget',
- 'sfWidgetFormSelect' => 'widget',
- 'sfWidgetFormSelectCheckbox' => 'widget',
- 'sfWidgetFormSelectMany' => 'widget',
- 'sfWidgetFormSelectRadio' => 'widget',
- 'sfWidgetFormTextarea' => 'widget',
- 'sfWidgetFormTime' => 'widget',
- 'sfYaml' => 'yaml',
- 'sfYamlDumper' => 'yaml',
- 'sfYamlInline' => 'yaml',
- 'sfYamlParser' => 'yaml',
- );
- }
|