本文整理汇总了PHP中Zend_Service_Ebay_Finding类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Service_Ebay_Finding类的具体用法?PHP Zend_Service_Ebay_Finding怎么用?PHP Zend_Service_Ebay_Finding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Service_Ebay_Finding类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testConstructor
public function testConstructor()
{
$this->assertEquals('EBAY-US', $this->_finding->getOption(Zend_Service_Ebay_Finding::OPTION_GLOBAL_ID));
$this->assertEquals('foo', $this->_finding->getOption(Zend_Service_Ebay_Finding::OPTION_APP_ID));
$options = array(Zend_Service_Ebay_Finding::OPTION_APP_ID => 'app-id', Zend_Service_Ebay_Finding::OPTION_GLOBAL_ID => 'EBAY-GB', 'foo' => 'bar');
$finding = new Zend_Service_Ebay_Finding($options);
$this->assertEquals('EBAY-GB', $finding->getOption(Zend_Service_Ebay_Finding::OPTION_GLOBAL_ID));
$this->assertEquals('app-id', $finding->getOption(Zend_Service_Ebay_Finding::OPTION_APP_ID));
$this->assertEquals('bar', $finding->getOption('foo'));
$this->setExpectedException('Zend_Service_Ebay_Finding_Exception');
$finding = new Zend_Service_Ebay_Finding(array('foo' => 'bar'));
}
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:12,代码来源:OfflineTest.php
示例2: testItemsPagination
public function testItemsPagination()
{
// page 1
// make sure this search will generate more than one page as result
$page1 = $this->_finding->findItemsByKeywords('laptop');
$this->assertEquals(1, $page1->paginationOutput->pageNumber);
// out of range, page #0
try {
$page1->page($this->_finding, 0);
$this->fail('No exception found for page #0');
} catch (Exception $e) {
$this->assertTrue($e instanceof Zend_Service_Ebay_Finding_Exception);
$this->assertContains('Page number ', $e->getMessage());
}
// out of range, one page after last one
try {
$number = $page1->paginationOutput->totalPages + 1;
$page1->page($this->_finding, $number);
$this->fail("No exception found for page out of range #{$number}");
} catch (Exception $e) {
$this->assertTrue($e instanceof Zend_Service_Ebay_Finding_Exception);
$this->assertContains('Page number ', $e->getMessage());
}
// page next
$page2 = $page1->pageNext($this->_finding);
$this->assertEquals(2, $page2->paginationOutput->pageNumber);
// previous
$previous = $page2->pagePrevious($this->_finding);
$this->assertEquals(1, $previous->paginationOutput->pageNumber);
$this->assertNull($page1->pagePrevious($this->_finding));
// first
$first = $page2->pageFirst($this->_finding);
$this->assertEquals(1, $first->paginationOutput->pageNumber);
// last
$last = $page2->pageLast($this->_finding);
$this->assertNotEquals(1, $last->paginationOutput->pageNumber);
// page #2
$some = $page1->page($this->_finding, 2);
$this->assertEquals(2, $some->paginationOutput->pageNumber);
}
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:40,代码来源:OnlineTest.php
示例3: findItemsByProduct
/**
* @param Zend_Service_Ebay_Finding $proxy
* @param Zend_Config|array $options
* @return Zend_Service_Ebay_Finding_Response_Items
*/
public function findItemsByProduct(Zend_Service_Ebay_Finding $proxy, $options = null)
{
$type = $this->attributes('productId', 'type');
return $proxy->findItemsByProduct($this->productId, $type, $options);
}
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:10,代码来源:Item.php
示例4: _initXPath
/**
* Load DOMXPath for current DOM object.
*
* @see Zend_Service_Ebay_Finding::_parseResponse()
* @return void
*/
protected function _initXPath()
{
$document = $this->_dom->ownerDocument;
if (!isset($document->ebayFindingXPath)) {
$xpath = new DOMXPath($document);
foreach (Zend_Service_Ebay_Finding::getXmlNamespaces() as $alias => $uri) {
$xpath->registerNamespace($alias, $uri);
}
$document->ebayFindingXPath = $xpath;
}
$this->_xPath = $document->ebayFindingXPath;
}
开发者ID:alefernie,项目名称:intranet,代码行数:18,代码来源:Abstract.php
示例5: findItems
/**
* @param Zend_Service_Ebay_Finding $proxy
* @param Zend_Config|array $options
* @return Zend_Service_Ebay_Finding_Response_Items
*/
public function findItems(Zend_Service_Ebay_Finding $proxy, $options = null)
{
return $proxy->findItemsInEbayStores($this->storeName, $options);
}
开发者ID:anunay,项目名称:stentors,代码行数:9,代码来源:Storefront.php
示例6: findItems
/**
* @param Zend_Service_Ebay_Finding $proxy
* @param Zend_Config|array $options
* @return Zend_Service_Ebay_Finding_Response_Items
*/
public function findItems(Zend_Service_Ebay_Finding $proxy, $options = null)
{
return $proxy->findItemsByCategory($this->categoryId, $options);
}
开发者ID:alanaipe2015,项目名称:moodle,代码行数:9,代码来源:Category.php
注:本文中的Zend_Service_Ebay_Finding类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论