• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Gdata_App_Entry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Zend_Gdata_App_Entry的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_App_Entry类的具体用法?PHP Zend_Gdata_App_Entry怎么用?PHP Zend_Gdata_App_Entry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Zend_Gdata_App_Entry类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testCanAddIndividualEntries

 public function testCanAddIndividualEntries()
 {
     $this->feed->transferFromXML($this->feedText);
     $this->assertEquals(1, count($this->feed->entry));
     $oldTitle = $this->feed->entry[0]->title->text;
     $newEntry = new Zend_Gdata_App_Entry();
     $newEntry->setTitle(new Zend_Gdata_App_Extension_Title("Foo"));
     $this->feed->addEntry($newEntry);
     $this->assertEquals(2, count($this->feed->entry));
     $this->assertEquals($oldTitle, $this->feed->entry[0]->title->text);
     $this->assertEquals("Foo", $this->feed->entry[1]->title->text);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:FeedTest.php


示例2: testConvertEntryToAndFromString

 public function testConvertEntryToAndFromString()
 {
     $this->enry->transferFromXML($this->enryText);
     $enryXml = $this->enry->saveXML();
     $newEntry = new Zend_Gdata_App_Entry();
     $newEntry->transferFromXML($enryXml);
     /*
             $this->assertEquals(1, count($newEntry->entry));
             $this->assertEquals('dive into mark', $newEntry->title->text);
             $this->assertEquals('text', $newEntry->title->type);
             $this->assertEquals('2005-07-31T12:29:29Z', $newEntry->updated->text);
             $this->assertEquals('tag:example.org,2003:3', $newEntry->id->text);
             $this->assertEquals(2, count($newEntry->link));
             $this->assertEquals('http://example.org/',
                     $newEntry->getAlternateLink()->href);
             $this->assertEquals('en',
                     $newEntry->getAlternateLink()->hrefLang);
             $this->assertEquals('text/html',
                     $newEntry->getAlternateLink()->type);
             $this->assertEquals('http://example.org/enry.atom',
                     $newEntry->getSelfLink()->href);
             $this->assertEquals('application/atom+xml',
                     $newEntry->getSelfLink()->type);
             $this->assertEquals('Copyright (c) 2003, Mark Pilgrim',
                     $newEntry->rights->text);
             $entry = $newEntry->entry[0];
             $this->assertEquals('Atom draft-07 snapshot', $entry->title->text);
             $this->assertEquals('tag:example.org,2003:3.2397',
                     $entry->id->text);
             $this->assertEquals('2005-07-31T12:29:29Z', $entry->updated->text);
             $this->assertEquals('2003-12-13T08:29:29-04:00',
                     $entry->published->text);
             $this->assertEquals('Mark Pilgrim',
                     $entry->author[0]->name->text);
             $this->assertEquals('http://example.org/',
                     $entry->author[0]->uri->text);
             $this->assertEquals(2, count($entry->contributor));
             $this->assertEquals('Sam Ruby',
                     $entry->contributor[0]->name->text);
             $this->assertEquals('Joe Gregorio',
                     $entry->contributor[1]->name->text);
             $this->assertEquals('xhtml', $entry->content->type);
     */
 }
开发者ID:omusico,项目名称:logica,代码行数:44,代码来源:EntryTest.php


示例3: takeChildFromDOM

 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gphoto') . ':' . 'user':
             $user = new Zend_Gdata_Photos_Extension_User();
             $user->transferFromDOM($child);
             $this->_gphotoUser = $user;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'nickname':
             $nickname = new Zend_Gdata_Photos_Extension_Nickname();
             $nickname->transferFromDOM($child);
             $this->_gphotoNickname = $nickname;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'thumbnail':
             $thumbnail = new Zend_Gdata_Photos_Extension_Thumbnail();
             $thumbnail->transferFromDOM($child);
             $this->_gphotoThumbnail = $thumbnail;
             break;
         case $this->lookupNamespace('atom') . ':' . 'entry':
             $entryClassName = $this->_entryClassName;
             $tmpEntry = new Zend_Gdata_App_Entry($child);
             $categories = $tmpEntry->getCategory();
             foreach ($categories as $category) {
                 if ($category->scheme == Zend_Gdata_Photos::KIND_PATH && $this->_entryKindClassMapping[$category->term] != "") {
                     $entryClassName = $this->_entryKindClassMapping[$category->term];
                     break;
                 } else {
                     require_once 'Zend/Gdata/App/Exception.php';
                     throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
                 }
             }
             $newEntry = new $entryClassName($child);
             $newEntry->setHttpClient($this->getHttpClient());
             $this->_entry[] = $newEntry;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
开发者ID:hackingman,项目名称:TubeX,代码行数:41,代码来源:UserFeed.php


示例4: takeChildFromDOM

 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gphoto') . ':' . 'id':
             $id = new Zend_Gdata_Photos_Extension_Id();
             $id->transferFromDOM($child);
             $this->_gphotoId = $id;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'user':
             $user = new Zend_Gdata_Photos_Extension_User();
             $user->transferFromDOM($child);
             $this->_gphotoUser = $user;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'nickname':
             $nickname = new Zend_Gdata_Photos_Extension_Nickname();
             $nickname->transferFromDOM($child);
             $this->_gphotoNickname = $nickname;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'name':
             $name = new Zend_Gdata_Photos_Extension_Name();
             $name->transferFromDOM($child);
             $this->_gphotoName = $name;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'location':
             $location = new Zend_Gdata_Photos_Extension_Location();
             $location->transferFromDOM($child);
             $this->_gphotoLocation = $location;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'access':
             $access = new Zend_Gdata_Photos_Extension_Access();
             $access->transferFromDOM($child);
             $this->_gphotoAccess = $access;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'timestamp':
             $timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
             $timestamp->transferFromDOM($child);
             $this->_gphotoTimestamp = $timestamp;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'numphotos':
             $numphotos = new Zend_Gdata_Photos_Extension_NumPhotos();
             $numphotos->transferFromDOM($child);
             $this->_gphotoNumPhotos = $numphotos;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled':
             $commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
             $commentingEnabled->transferFromDOM($child);
             $this->_gphotoCommentingEnabled = $commentingEnabled;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'commentCount':
             $commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
             $commentCount->transferFromDOM($child);
             $this->_gphotoCommentCount = $commentCount;
             break;
         case $this->lookupNamespace('atom') . ':' . 'entry':
             $entryClassName = $this->_entryClassName;
             $tmpEntry = new Zend_Gdata_App_Entry($child);
             $categories = $tmpEntry->getCategory();
             foreach ($categories as $category) {
                 if ($category->scheme == Zend_Gdata_Photos::KIND_PATH && $this->_entryKindClassMapping[$category->term] != "") {
                     $entryClassName = $this->_entryKindClassMapping[$category->term];
                     break;
                 } else {
                     // require_once 'Zend/Gdata/App/Exception.php';
                     throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
                 }
             }
             $newEntry = new $entryClassName($child);
             $newEntry->setHttpClient($this->getHttpClient());
             $this->_entry[] = $newEntry;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
开发者ID:crlang44,项目名称:frapi,代码行数:76,代码来源:AlbumFeed.php


示例5: takeChildFromDOM

 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gphoto') . ':' . 'id':
             $id = new Zend_Gdata_Photos_Extension_Id();
             $id->transferFromDOM($child);
             $this->_gphotoId = $id;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'version':
             $version = new Zend_Gdata_Photos_Extension_Version();
             $version->transferFromDOM($child);
             $this->_gphotoVersion = $version;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'albumid':
             $albumid = new Zend_Gdata_Photos_Extension_AlbumId();
             $albumid->transferFromDOM($child);
             $this->_gphotoAlbumId = $albumid;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'width':
             $width = new Zend_Gdata_Photos_Extension_Width();
             $width->transferFromDOM($child);
             $this->_gphotoWidth = $width;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'height':
             $height = new Zend_Gdata_Photos_Extension_Height();
             $height->transferFromDOM($child);
             $this->_gphotoHeight = $height;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'size':
             $size = new Zend_Gdata_Photos_Extension_Size();
             $size->transferFromDOM($child);
             $this->_gphotoSize = $size;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'client':
             $client = new Zend_Gdata_Photos_Extension_Client();
             $client->transferFromDOM($child);
             $this->_gphotoClient = $client;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'checksum':
             $checksum = new Zend_Gdata_Photos_Extension_Checksum();
             $checksum->transferFromDOM($child);
             $this->_gphotoChecksum = $checksum;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'timestamp':
             $timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
             $timestamp->transferFromDOM($child);
             $this->_gphotoTimestamp = $timestamp;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled':
             $commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
             $commentingEnabled->transferFromDOM($child);
             $this->_gphotoCommentingEnabled = $commentingEnabled;
             break;
         case $this->lookupNamespace('gphoto') . ':' . 'commentCount':
             $commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
             $commentCount->transferFromDOM($child);
             $this->_gphotoCommentCount = $commentCount;
             break;
         case $this->lookupNamespace('media') . ':' . 'group':
             $mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup();
             $mediaGroup->transferFromDOM($child);
             $this->_mediaGroup = $mediaGroup;
             break;
         case $this->lookupNamespace('atom') . ':' . 'entry':
             $entryClassName = $this->_entryClassName;
             $tmpEntry = new Zend_Gdata_App_Entry($child);
             $categories = $tmpEntry->getCategory();
             foreach ($categories as $category) {
                 if ($category->scheme == Zend_Gdata_Photos::KIND_PATH && $this->_entryKindClassMapping[$category->term] != "") {
                     $entryClassName = $this->_entryKindClassMapping[$category->term];
                     break;
                 } else {
                     // require_once 'Zend/Gdata/App/Exception.php';
                     throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
                 }
             }
             $newEntry = new $entryClassName($child);
             $newEntry->setHttpClient($this->getHttpClient());
             $this->_entry[] = $newEntry;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:86,代码来源:PhotoFeed.php


示例6: testGenerateIfMatchHeaderDataReturnsEtagIfNotWeakAndFlagSet

 public function testGenerateIfMatchHeaderDataReturnsEtagIfNotWeakAndFlagSet()
 {
     $etag = 'ABCD1234';
     $this->service->setMajorProtocolVersion(2);
     $entry = new Zend_Gdata_App_Entry();
     $entry->setEtag($etag);
     $result = $this->service->generateIfMatchHeaderData($entry, true);
     $this->assertEquals($etag, $result);
 }
开发者ID:JeancarloPerez,项目名称:booking-system,代码行数:9,代码来源:AppTest.php


示例7: 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');
     }
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:25,代码来源:App.php


示例8: __construct

 public function __construct($element = null)
 {
     foreach (Zend_Gdata::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
     parent::__construct($element);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:7,代码来源:Entry.php


示例9: __construct

 /**
  * Constructs a new MediaEntry, representing XML data and optional
  * file to upload
  *
  * @param DOMElement $element (optional) DOMElement from which this
  *          object should be constructed.
  */
 public function __construct($element = null, $mediaSource = null)
 {
     parent::__construct($element);
     $this->_mediaSource = $mediaSource;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:12,代码来源:MediaEntry.php


示例10: get_tags

 public function get_tags()
 {
     return implode(",", $this->entry->getVideoTags());
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:4,代码来源:Element.php


示例11: get_created_on

 /**
  *
  * @var DateTime
  */
 public function get_created_on()
 {
     return new DateTime($this->entry->getPublished()->getText());
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:8,代码来源:Container.php



注:本文中的Zend_Gdata_App_Entry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Gdata_App_Extension类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Gdata_App_Base类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap