public function getById($id) { foreach ($this->xml->entry as $entry) { if ($entry->id->__toString() == $id) { return new Spreadsheet($entry); } } throw new SpreadsheetNotFoundException(); }