本文整理汇总了PHP中Zend_Gdata_Spreadsheets::getWorksheetEntry方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_Spreadsheets::getWorksheetEntry方法的具体用法?PHP Zend_Gdata_Spreadsheets::getWorksheetEntry怎么用?PHP Zend_Gdata_Spreadsheets::getWorksheetEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Gdata_Spreadsheets
的用法示例。
在下文中一共展示了Zend_Gdata_Spreadsheets::getWorksheetEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postUpdate
public function postUpdate($values)
{
//clear cache
#@exec("rm /var/frontend/web/cache/".str_replace("http://", "", $this->Asset->retriveUrl2()));
set_time_limit(0);
error_reporting(E_ALL);
ini_set('display_errors', '1');
$clientLibraryPath = sfConfig::get('sf_lib_dir') . '/vendor/ZendGdata-1.11.11/library';
$oldPath = set_include_path($clientLibraryPath);
// load Zend Gdata libraries
require_once sfConfig::get('sf_lib_dir') . '/vendor/ZendGdata-1.11.11/library/Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
// set credentials for ClientLogin authentication
$user = "cmp@tvcultura.com.br";
$pass = "alipio@28042011";
//die($this->getSpreadsheetId()."<br>".$this->getWorksheetId());
try {
// connect to API
$service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
$service = new Zend_Gdata_Spreadsheets($client);
// get worksheet entry
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($this->getSpreadsheetId());
$query->setWorksheetId($this->getWorksheetId());
$wsEntry = $service->getWorksheetEntry($query);
$title = new Zend_Gdata_App_Extension_Title($this->getQuestion());
$wsEntry->setTitle($title);
// update entry
$entryResult = $service->updateEntry($wsEntry, $wsEntry->getLink('edit')->getHref());
echo 'The ID of the updated worksheet entry is: ' . $entryResult->id;
} catch (Exception $e) {
die('ERROR: ' . $e->getMessage());
}
}