Changeset 538
- Timestamp:
- 2008年10月04日 16時22分56秒 (2 months ago)
- Files:
-
- 1 modified
-
trunk/src/Piece/ORM.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Piece/ORM.php
r511 r538 38 38 namespace Piece; 39 39 40 use Piece::ORM::Config:: ConfigFactory;40 use Piece::ORM::Config::Reader; 41 41 use Piece::ORM::Context; 42 42 use Piece::ORM::Mapper::MapperFactory; … … 92 92 * 93 93 * First this method tries to load a configuration from a configuration file in 94 * the given configration directory using 95 * Piece::ORM::Config::ConfigFactory::factory(). The method creates a new object 96 * if the load failed. 94 * the given configration directory using a Piece::ORM::Config::Reader object. 95 * The method creates a new object if the load failed. 97 96 * Second this method sets the configuration to the current context. And also 98 97 * this method sets the configuration directory for the mapper configuration, and … … 111 110 Registry::setContext(new Context()); 112 111 $context = Registry::getContext(); 113 $config = ConfigFactory::factory($configDirectory, $cacheDirectory);114 $context->setConfiguration($config);115 112 $context->setMapperConfigDirectory($mapperConfigDirectory); 116 113 $context->setCacheDirectory($cacheDirectory); 114 115 $reader = new Reader($configDirectory); 116 $config = $reader->read(); 117 $context->setConfiguration($config); 118 117 119 $defaultDatabase = $config->getDefaultDatabase(); 118 120 if (!is_null($defaultDatabase)) {
