Google\Spreadsheet\SpreadsheetFeed::getById PHP Method

getById() public method

Gets a spreadhseet from the feed by its ID in google drive.
public getById ( string $id ) : Spreadsheet
$id string
return Spreadsheet
    public function getById($id)
    {
        foreach ($this->xml->entry as $entry) {
            if ($entry->id->__toString() == $id) {
                return new Spreadsheet($entry);
            }
        }
        throw new SpreadsheetNotFoundException();
    }