Google\Spreadsheet\CellFeed::getPostUrl PHP Method

getPostUrl() public method

Get the feed post url
public getPostUrl ( ) : string
return string
    public function getPostUrl()
    {
        return Util::getLinkHref($this->xml, "http://schemas.google.com/g/2005#post");
    }

Usage Example

 /**
  * 
  * @param CellFeed $cellFeed
  * 
  * @return \SimpleXMLElement
  *
  * @throws EmptyBatchException
  */
 public function createRequestXml(CellFeed $cellFeed)
 {
     if (count($this->entries) === 0) {
         throw new EmptyBatchException();
     }
     $feed = new \SimpleXMLElement("\n            <feed\n                xmlns=\"http://www.w3.org/2005/Atom\"\n                xmlns:batch=\"http://schemas.google.com/gdata/batch\"\n                xmlns:gs=\"http://schemas.google.com/spreadsheets/2006\">\n            </feed>\n        ");
     $feed->id = $cellFeed->getPostUrl();
     $i = 1;
     foreach ($this->entries as $cellEntry) {
         $entry = $feed->addChild("entry");
         $entry->addChild("xmlns:batch:id", "A" . $i++);
         $op = $entry->addChild("xmlns:batch:operation");
         $op->addAttribute("type", "update");
         $entry->addChild("id", $cellFeed->getPostUrl() . "/" . $cellEntry->getCellIdString());
         $link = $entry->addChild("link");
         $link->addAttribute("rel", "edit");
         $link->addAttribute("type", "application/atom+xml");
         $link->addAttribute("href", $cellEntry->getEditUrl());
         $cell = $entry->addChild("xmlns:gs:cell");
         $cell->addAttribute("row", $cellEntry->getRow());
         $cell->addAttribute("col", $cellEntry->getColumn());
         $cell->addAttribute("inputValue", $cellEntry->getContent());
     }
     return $feed;
 }
All Usage Examples Of Google\Spreadsheet\CellFeed::getPostUrl