public function run() { foreach (FileHandler::get_data('Recipe') as $r) { $r->reagents = array(); $this->recipes[$r->id] = $r; $this->item_to_recipe[$r->item_id][] = $r->id; foreach ($r->extra->reagents as $item_id => $amount) { $this->recipes[$r->id]->reagents[] = (object) array('item_id' => $item_id, 'amount' => $amount); } } foreach ($this->recipes as $r) { $this->recursive($r, $r->level, $r->classjob, $r->yields); } list($careers, $career_job) = $this->compile(); FileHandler::save('careers', $careers); FileHandler::save('career_classjob', $career_job); }
/** * Store media as file * on the fs * * By default create a directory if not * currently available * * @param filename: full file name * @param extention: extention to save in */ public function store($filename, $filext = DEFAULTS::EXTENSION) { return FileHandler::save($filename, $this->data); }