public function __construct(array $options = array(), $username = null, $password = null) { $options = Dfi_App_Config::getConfig(true, 'main.auth'); $this->setOptions($options); if ($username !== null) { $this->setUsername($username); } if ($password !== null) { $this->setPassword($password); } }
private function _setup() { $this->cwd = getcwd(); $this->_initPaths($this->cwd . '/application'); $this->_readAppConfig(); $includeConfig = Dfi_App_Config::get('phpSettings.include_path', ''); $this->_initIncludePaths($includeConfig); Zend_Loader_Autoloader::getInstance()->registerNamespace('Dfi_')->suppressNotFoundWarnings(true); foreach (Dfi_App_Config::getConfig(true, false, array(), 'scaffold') as $key => $value) { $method = '_' . $key; if (property_exists($this, $method)) { $this->{$method} = $value; } } $propelConfig = Dfi_App_Config::get('db.config', null); if (null === $propelConfig) { $projectProvider = $this->_registry->getProviderRepository()->getProvider('propelorm'); $projectProvider->generate(); } $this->_initPropel($propelConfig); $this->_packageName = $this->_getCamelCase(Propel::getConfiguration()['datasources']['default']); }