Google\Spreadsheet\ServiceRequestFactory::getInstance PHP Method

getInstance() public static method

[getInstance description]
public static getInstance ( ) : Google\Spreadsheet\ServiceRequestInterface
return Google\Spreadsheet\ServiceRequestInterface
    public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new Exception();
        }
        return self::$instance;
    }

Usage Example

 /**
  * Insert a new row into this feed
  * 
  * @param array $row
  * 
  * @return void
  */
 public function insert($row)
 {
     $entry = '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended">';
     foreach ($row as $colName => $value) {
         $entry .= sprintf('<gsx:%s><![CDATA[%s]]></gsx:%s>', $colName, $value, $colName);
     }
     $entry .= '</entry>';
     ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry);
 }
All Usage Examples Of Google\Spreadsheet\ServiceRequestFactory::getInstance
ServiceRequestFactory