Ejemplo n.º 1
0
 /**
  * Xapp_Singleton interface impl.
  *
  * static singleton method to create static instance of driver with optional third parameter
  * xapp options array or object
  *
  * @error 15501
  * @param null|mixed $options expects optional xapp option array or object
  * @return XApp_Store
  */
 public static function instance($options = null)
 {
     if (self::$_instance === null) {
         self::$_instance = new self($options);
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 /**
  * @param $storePath
  * @param $dataPath
  * @param $dataQuery
  * @param $newValue
  * @return mixed
  */
 public function updateCI($storePath, $dataPath, $dataQuery, $newValue)
 {
     xapp_import('xapp.Store.*');
     xapp_import('xapp.xide.Store.*');
     $storeOptions = array(XApp_Store::READER_CLASS => 'XIDE_CIStore_Delegate', XApp_Store::WRITER_CLASS => 'XIDE_CIStore_Delegate', XApp_Store::PRIMARY_KEY => 'inputs', XApp_Store::IDENTIFIER => '', XApp_Store::CONF_FILE => $storePath, XApp_Store::CONF_PASSWORD => '');
     $store = new XApp_Store($storeOptions);
     $data = $store->set('', $dataPath, $dataQuery, $newValue);
     return $data;
 }