}
- function jsonImportFromArray($opts)
- {
- foreach($this->opts as $o=>$v) {
- if (!preg_match('/^json-/', $o) || empty($v)) {
- continue;
- }
- $type = str_replace('_', '-', substr($o,6));
- $data= json_decode(file_get_contents($file),true);
- DB_DataObject::factory($type)->importFromArray($data);
-
- }
-
-
-
+
}
- function get($k = '',$opt)
+ function get($k = '',$opts)
{
$k = strtolower($k);
- $this->opts = $opt;
+ $this->opts = $opts;
require_once 'Pman/Core/UpdateDatabase.php';
-
-
+ Pman_Core_UpdateDatabase::jsonImportFromArray($opts)
$this->updateData($k);