当前位置: 首页>>代码示例>>PHP>>正文


PHP Feed::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($config)
 {
     $config['link'] = 'http://www.instapaper.com/';
     $config['url'] = sprintf('http://www.instapaper.com/archive/rss/%s/%s', $config['userid'], $config['token']);
     parent::__construct($config);
     $this->setItemTemplate('<li><a href="{{{link}}}">{{{title}}}</a></li>' . "\n");
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:7,代码来源:Instapaper.php

示例2: __construct

 /**
  * constructor
  *
  * @param string    $starsFile File to store starred data
  * @param Feed_Conf $kfc      Object corresponding to feed reader config
  */
 public function __construct($starFile, $starItemFile, $kfc)
 {
     parent::__construct($starFile, '', $kfc);
     $this->starItemFile = $starItemFile;
     if (is_file($this->starItemFile)) {
         include_once $this->starItemFile;
     }
 }
开发者ID:inscriptionweb,项目名称:kriss_feed,代码行数:14,代码来源:Star.php

示例3: __construct

 /**
  * @constructor
  */
 public function __construct($config)
 {
     $config['url'] = sprintf('https://github.com/%s.atom', $config['username']);
     $config['link'] = 'https://github.com/' . $config['username'];
     $config['contenttype'] = 'application/atom+xml';
     parent::__construct($config);
     $this->setItemTemplate('<li><a href="{{{link}}}">{{{title}}}</a> ({{{date}}})</li>' . PHP_EOL);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:11,代码来源:Github.php

示例4: __construct

 /**
  * __construct function.
  * Set the required channel properties.
  * @access public
  * @param mixed $channelTitle
  * @param mixed $channelLink
  * @param mixed $channelDescription
  * @return void
  */
 public function __construct($channelTitle = '', $channelLink = '', $channelDescription = '')
 {
     parent::__construct();
     // Set the required channel properties
     $this->setProperty('title', $channelTitle);
     $this->setProperty('link', $channelLink);
     $this->setProperty('description', $channelDescription);
     // Set the last build date to the current date and time
     $this->setProperty('lastBuildDate', date(DateTime::RSS));
 }
开发者ID:royk,项目名称:php-feed,代码行数:19,代码来源:RSS.class.php

示例5: __construct

 public function __construct($config)
 {
     $config['list'] = isset($config['list']) ? $config['list'] : 'uploads';
     $config['url'] = 'http://gdata.youtube.com/feeds/api/users/' . $config['username'] . '/' . $config['list'] . '?v=2&orderby=published&max-results=' . $config['total'];
     $config['link'] = 'http://youtube.com/user/' . $config['username'];
     $config['contenttype'] = 'application/atom+xml';
     parent::__construct($config);
     $this->setItemTemplate('<li>
                 <a href="{{{link}}}"><img src="{{{media_thumbnail_url}}}" alt="" class="item-media-thumbnail" height="75"/>
                 {{{title}}}</a> ({{{date}}})
              </li>' . "\n");
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:12,代码来源:Youtube.php

示例6: __construct

 public function __construct($config)
 {
     $config['list'] = isset($config['list']) ? $config['list'] : 'videos';
     $config['url'] = sprintf('http://vimeo.com/%s/%s/rss', $config['username'], $config['list']);
     $config['link'] = 'http://www.vimeo.com/' . $config['username'] . '/';
     $config['contenttype'] = 'application/rss+xml';
     parent::__construct($config);
     $this->setItemTemplate('<li>
                 <a href="{{{link}}}"><img src="{{{media_thumbnail_url}}}" alt="" class="item-media-thumbnail" height="75"/>
                 {{{title}}}</a> ({{{date}}})
              </li>' . "\n");
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:12,代码来源:Vimeo.php

示例7: __construct

 /**
  * __construct function.
  * Set the required element properties.
  * @access public
  * @param mixed $channelTitle
  * @param mixed $channelId
  * @param mixed $channelDescription
  * @return void
  */
 public function __construct($channelTitle = '', $channelId = '')
 {
     parent::__construct();
     // Set the required channel elements
     $this->setProperty('title', $channelTitle);
     /**
      * The channel ID "Identifies the feed using a universally unique and permanent URI"
      * See: http://www.atomenabled.org/developers/syndication/#requiredFeedElements
      */
     $this->setProperty('id', $channelId);
     // Set the last build date to the current date and time
     $this->setProperty('updated', date(DateTime::ATOM));
 }
开发者ID:royk,项目名称:php-feed,代码行数:22,代码来源:Atom.class.php

示例8: __construct

 public function __construct($config)
 {
     $config['link'] = 'http://delicious.com/' . $config['username'] . '/';
     $config['url'] = sprintf('http://feeds.delicious.com/v2/rss/%s?count=%s', $config['username'], $config['total']);
     parent::__construct($config);
     $this->setItemTemplate('<li>
             <a href="{{{link}}}">{{{title}}}</a>
             ({{{date}}})
             {{#category}}
                 <em><a href="{{{service_link}}}{{{category}}}">{{{category}}}</a></em>
             {{/category}}
          </li>' . "\n");
 }
开发者ID:netconstructor,项目名称:PubwichFork,代码行数:13,代码来源:Delicious.php

示例9: DOMDocument

 function __construct($file, $recordLabel)
 {
     parent::__construct();
     /*	$file = file_get_contents($contentFile['products']);
     		$htmlDom = new DOMDocument();
     		$htmlDom->loadXML($file);
     		$this->_file_handler = $htmlDom->getElementsByTagName($contentFile['record']);	*/
     $file = file($file);
     $file = implode("", $file);
     $parser = xml_parser_create();
     xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
     xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
     xml_parse_into_struct($parser, $file, $this->_file_handler, $this->_items_iterator);
     xml_parser_free($parser);
     if (isset($recordLabel)) {
         $this->_items_iterator = $this->_items_iterator[$recordLabel];
     } else {
         throw new Exception("Error: Not defined delimiter");
     }
     $this->_items_iterator = new ArrayIterator(array_chunk($this->_items_iterator, 2));
 }
开发者ID:litmanovitziv,项目名称:struct-reader,代码行数:21,代码来源:XMLFeed.php

示例10: __construct

 public function __construct($config)
 {
     $config['link'] = 'http://delicious.com/' . $config['username'] . '/';
     $tags = null;
     if (isset($config['tags']) && is_string($config['tags'])) {
         $tags = explode(',', $config['tags']);
         foreach ($tags as $i => $tag) {
             $tags[$i] = urlencode(trim($tag));
         }
         $tags = '/' . implode('+', $tags);
     }
     $config['url'] = sprintf('http://feeds.delicious.com/v2/rss/%s%s?count=%s', $config['username'], $tags, $config['total']);
     parent::__construct($config);
     $this->setItemTemplate('<li>
             <a href="{{{link}}}">{{{title}}}</a>
             ({{{date}}})
             {{#category}}
                 <em><a href="{{{service_link}}}{{{category}}}">{{{category}}}</a></em>
             {{/category}}
          </li>' . "\n");
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:21,代码来源:Delicious.php

示例11: __construct

 public function __construct($config)
 {
     $username = '';
     $this->hasUsername = null;
     if (isset($config['username'])) {
         $username = $config['username'] . '/';
         $this->hasUsername = $config['username'];
     }
     $tag = '';
     $this->hasTag = null;
     if (isset($config['tag'])) {
         $tag = 'tag/' . $config['tag'] . '/';
         $this->hasTag = $config['tag'];
     }
     $config['contenttype'] = 'application/rss+xml';
     $config['link'] = 'http://identi.ca/' . $username . $tag;
     $config['url'] = $config['link'] . 'rss';
     parent::__construct($config);
     $this->setItemTemplate('<li>' . (!$this->hasUsername ? '<strong><a href="{{{user_link}}}">@{{{user_name}}}</a></strong>: ' : '') . '{{{status}}}
             (<a href="{{{link}}}">{{{date}}}</a>)
          </li>' . PHP_EOL);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:22,代码来源:IdenticaFeed.php

示例12: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($enabledCDATAEncoding = true)
 {
     parent::__construct(Feed::RSS2, $enabledCDATAEncoding);
 }
开发者ID:ericshea00,项目名称:feedwriter,代码行数:7,代码来源:RSS2.php

示例13: __construct

 public function __construct($config)
 {
     $config['contenttype'] = 'application/rss+xml';
     parent::__construct($config);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:5,代码来源:MediaRSS.php

示例14: __construct

 /**
  * @desc Builds a new ATOM object
  * @param string $module_id its module_id
  * @param string $feed_name the feeds name / type. default is Feed::DEFAULT_FEED_NAME
  * @param int $id_cat the feed category id
  */
 public function __construct($module_id, $feed_name = Feed::DEFAULT_FEED_NAME, $id_cat = 0)
 {
     parent::__construct($module_id, $feed_name, $id_cat);
     $this->tpl = new FileTemplate(self::DEFAULT_ATOM_TEMPLATE);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:11,代码来源:ATOM.class.php

示例15:

 /**
  * {@inheritdoc}
  */
 function __construct()
 {
     parent::__construct(Feed::RSS2);
 }
开发者ID:sbraz,项目名称:LBCAlerte,代码行数:7,代码来源:RSS2.php


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