CodeIgniter2的Doctrine2 CLI
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CodeIgniter2的Doctrine2 CLI相关的知识,希望对你有一定的参考价值。
<?php require_once 'Doctrine/Common/ClassLoader.php'; $classLoader = new DoctrineCommonClassLoader('Doctrine'); $classLoader->register(); $classLoader = new DoctrineCommonClassLoader('Symfony', 'Doctrine'); $classLoader->register(); $configFile = '../cli-config.php'; $helperSet = null; 'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR ); } require $configFile; foreach ($GLOBALS as $helperSetCandidate) { if ($helperSetCandidate instanceof SymfonyComponentConsoleHelperHelperSet) { $helperSet = $helperSetCandidate; break; } } } $helperSet = ($helperSet) ?: new SymfonyComponentConsoleHelperHelperSet(); $cli = new SymfonyComponentConsoleApplication('Doctrine Command Line Interface', DoctrineORMVersion::VERSION); $cli->setCatchExceptions(true); $cli->setHelperSet($helperSet); // DBAL Commands new DoctrineDBALToolsConsoleCommandRunSqlCommand(), new DoctrineDBALToolsConsoleCommandImportCommand(), // ORM Commands new DoctrineORMToolsConsoleCommandClearCacheMetadataCommand(), new DoctrineORMToolsConsoleCommandClearCacheResultCommand(), new DoctrineORMToolsConsoleCommandClearCacheQueryCommand(), new DoctrineORMToolsConsoleCommandSchemaToolCreateCommand(), new DoctrineORMToolsConsoleCommandSchemaToolUpdateCommand(), new DoctrineORMToolsConsoleCommandSchemaToolDropCommand(), new DoctrineORMToolsConsoleCommandEnsureProductionSettingsCommand(), new DoctrineORMToolsConsoleCommandConvertDoctrine1SchemaCommand(), new DoctrineORMToolsConsoleCommandGenerateRepositoriesCommand(), new DoctrineORMToolsConsoleCommandGenerateEntitiesCommand(), new DoctrineORMToolsConsoleCommandGenerateProxiesCommand(), new DoctrineORMToolsConsoleCommandConvertMappingCommand(), new DoctrineORMToolsConsoleCommandRunDqlCommand(), new DoctrineORMToolsConsoleCommandValidateSchemaCommand(), )); $cli->run();
以上是关于CodeIgniter2的Doctrine2 CLI的主要内容,如果未能解决你的问题,请参考以下文章
CodeIgniter2的Doctrine2包装器-开发配置。
PHP cli-config.php - doctrine2 + codeigniter2
在 Doctrine 2 / CodeIgniter 2 中找不到实体模型