Google\Spreadsheet\ListFeed::getEntries PHP Method

getEntries() public method

Get the entries of this feed
public getEntries ( ) : ListEntry[]
return ListEntry[]
    public function getEntries()
    {
        $rows = array();
        if (count($this->xml->entry) > 0) {
            foreach ($this->xml->entry as $entry) {
                $data = array();
                foreach ($entry->xpath('gsx:*') as $col) {
                    $data[$col->getName()] = $col->__toString();
                }
                $rows[] = new ListEntry($entry, $data);
            }
        }
        return $rows;
    }

Usage Example

 public function testDelete()
 {
     $mockServiceRequest = $this->getMockBuilder(DefaultServiceRequest::class)->setMethods(["delete"])->disableOriginalConstructor()->getMock();
     $mockServiceRequest->expects($this->once())->method("delete")->with($this->equalTo("https://spreadsheets.google.com/feeds/list/G3345eEsfsk60/od6/private/full/cokwr/bnkj8i7jo6c"));
     ServiceRequestFactory::setInstance($mockServiceRequest);
     $listFeed = new ListFeed($this->getSimpleXMLElement("list-feed"));
     $entry = current($listFeed->getEntries());
     $entry->delete();
 }
All Usage Examples Of Google\Spreadsheet\ListFeed::getEntries