public function setUp() { /* Setup Routine */ $this->_model = zerobin_data::getInstance(array('dir' => PATH . 'data')); serversalt::setPath(PATH . 'data'); $this->reset(); }
/** * get instance of singleton * * @access public * @static * @param array $options * @return zerobin_data */ public static function getInstance($options = null) { // if given update the data directory if (is_array($options) && array_key_exists('dir', $options)) { self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR; } // if needed initialize the singleton if (!self::$_instance instanceof zerobin_data) { self::$_instance = new self(); self::_init(); } return self::$_instance; }
public function setUp() { /* Setup Routine */ $this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'zerobin_data'; $this->_model = zerobin_data::getInstance(array('dir' => $this->_path)); }