-
- if($args == 'Person'){
- if(empty($opt['source']) || empty($opt['prefix'])){
- die("Missing Source directory for person json files or prefix for the passwrod! Try -f [JSON file path] -p [prefix] \n");
- }
- if (!file_exists($opt['source'])) {
- die("can not found person json file : {$opt['source']} \n");
- }
-
- $persons = json_decode(file_get_contents($opt['source']),true);
-
- DB_DataObject::factory('person')->importFromArray($this, $persons, $opt['prefix']);
- die("DONE! \n");
- }
-
-