Exemple #1
0
 /**
  * Gathers or configuration settings for DataCash
  *
  * @param string $configPath
  * @param string $file
  */
 function __construct($configPath = null, $file = null)
 {
     if (null !== $configPath && null !== $file) {
         Zend_ConfigSettings::setUpConfig($configPath, $file);
     } else {
         Zend_ConfigSettings::setUpConfig();
     }
     $config = Zend_Registry::get('general');
     $this->_datacash = Zend_Registry::get($config->environment)->datacash;
 }
 /**
  * Constructs our Dynamic DB settings, basically sets up our configurations
  * & constructs our parents functionality.
  *
  * @access public
  * 
  */
 public function __construct($env = null)
 {
     parent::__construct();
     $this->_schemas = array();
     if (null !== $env) {
         $this->_fixMan = new FixturesManager($env);
     } else {
         $this->_fixMan = new FixturesManager();
     }
     Zend_ConfigSettings::setUpConfig();
     $this->_general = Zend_Registry::get('general');
 }
Exemple #3
0
 /**
  * Initialises our DB connection for us.
  * 
  * Takes an environment as the parameter which is used to 
  * load up the correct configuration information.
  *
  * @access 	public
  * @param 	String 	$env		The environment we want to set our FixturesManager up in
  * 
  */
 public function __construct($env = null)
 {
     if (null === $env) {
         Zend_ConfigSettings::setUpConfig();
     } else {
         Zend_ConfigSettings::setUpConfigEnv($env);
     }
     Zend_ConfigSettings::setUpDBAdapter();
     $this->_db = Zend_Registry::get('db');
     $this->_allowedSQLCmds = array('CREATE', 'INSERT INTO');
 }
 /**
  * Constructor
  *
  * Initialize environment, root path, and configuration.
  * 
  * @access 	public
  * @param 	String	$path	Path to configuration file
  * @param 	String	$file	Configuration file.
  * @return 	void
  * 
  */
 static function setupInit($path = null, $file = null)
 {
     Zend_ConfigSettings::setUpConfig();
     self::$_general = Zend_Registry::get('general');
     self::_setEnv();
 }