public function rebuild() { foreach ($this->folder()->children() as $year) { foreach ($year->children() as $month) { foreach ($month->children() as $day) { foreach ($day->children() as $item) { $data = data::read($item->root() . DS . 'item.yaml'); $item = new Item($this, $data['type'], $data); $item->store(); } } } } }