本文整理汇总了PHP中Zend_Gdata_App_Entry::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_App_Entry::save方法的具体用法?PHP Zend_Gdata_App_Entry::save怎么用?PHP Zend_Gdata_App_Entry::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Gdata_App_Entry
的用法示例。
在下文中一共展示了Zend_Gdata_App_Entry::save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: put
/**
* Put an entry
*
* TODO Determine if App should call Entry to Update or the opposite.
* Suspecect opposite would mkae more sense. Also, this possibly should
* take an optional URL to override URL used in the entry, or if an
* edit URI/ID is not present in the entry
*
* @param mixed $data Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')
* @return Zend_Gdata_App_Entry The entry returned from the server
* @throws Zend_Gdata_App_Exception
*/
public function put($data)
{
if (is_string($data)) {
$entry = new Zend_Gdata_App_Entry($data);
$entry->setHttpClient($this->_httpClient);
return $entry->save();
} elseif ($data instanceof Zend_Gdata_App_Entry) {
return $data->save();
} else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException('You must specify the data to post as either a XML string or a child of Zend_Gdata_App_Entry');
}
}