本文整理汇总了PHP中Zend_Gdata_Query::setStartIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_Query::setStartIndex方法的具体用法?PHP Zend_Gdata_Query::setStartIndex怎么用?PHP Zend_Gdata_Query::setStartIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Gdata_Query
的用法示例。
在下文中一共展示了Zend_Gdata_Query::setStartIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetAndGetStartIndex
public function testSetAndGetStartIndex()
{
$query = new Zend_Gdata_Query();
$query->setStartIndex(12);
$this->assertEquals(12, $query->getStartIndex());
$this->assertTrue(strpos($query->getQueryUrl(), 'start-index=12') !== false);
}
示例2: testSetAndGetStartIndex
public function testSetAndGetStartIndex()
{
$query = new Zend_Gdata_Query();
$query->setStartIndex(12);
$this->assertEquals(12, $query->getStartIndex());
$this->assertContains('start-index=12', $query->getQueryUrl());
}
示例3: get_user_object_list_feed
/**
*
* @param string $object
* @param int $offset_start
* @param int $quantity
* @return string
*/
protected function get_user_object_list_feed($object, $offset_start, $quantity)
{
$feed = null;
switch ($object) {
case self::ELEMENT_TYPE_VIDEO:
$uri = Zend_Gdata_YouTube::USER_URI . '/default/' . Zend_Gdata_YouTube::UPLOADS_URI_SUFFIX;
$query = new Zend_Gdata_Query($uri);
if ($quantity !== 0) {
$query->setMaxResults($quantity);
}
$query->setStartIndex($offset_start);
$feed = $this->_api->getUserUploads(null, $query);
break;
case self::CONTAINER_TYPE_PLAYLIST:
$uri = Zend_Gdata_YouTube::USER_URI . '/default/playlists';
$query = new Zend_Gdata_Query($uri);
if ($quantity !== 0) {
$query->setMaxResults($quantity);
}
$query->setStartIndex($offset_start);
$feed = $this->_api->getPlaylistListFeed(null, $query);
break;
default:
throw new Bridge_Exception_ObjectUnknown('Unknown object ' . $object);
break;
}
return $feed;
}