__construct() public method

public __construct ( $id = null, $name = null, $attributes = null, $status = null, $origin = null, $systemFeedGenerationData = null )
Esempio n. 1
0
 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");
 }
Esempio n. 2
0
 /**
  * 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;
     }
 }
Esempio n. 3
0
 /**
  * @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);
 }
Esempio n. 4
0
 /**
  * __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));
 }
Esempio n. 5
0
 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");
 }
Esempio n. 6
0
 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");
 }
Esempio n. 7
0
 /**
  * __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));
 }
Esempio n. 8
0
 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");
 }
Esempio n. 9
0
 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));
 }
Esempio n. 10
0
 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");
 }
Esempio n. 11
0
 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);
 }
Esempio n. 12
0
 /**
  * {@inheritdoc}
  */
 public function __construct($enabledCDATAEncoding = true)
 {
     parent::__construct(Feed::RSS2, $enabledCDATAEncoding);
 }
Esempio n. 13
0
 public function __construct($config)
 {
     $config['contenttype'] = 'application/rss+xml';
     parent::__construct($config);
 }
Esempio n. 14
0
 /**
  * @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);
 }
Esempio n. 15
0
 /**
  * {@inheritdoc}
  */
 function __construct()
 {
     parent::__construct(Feed::RSS2);
 }
Esempio n. 16
0
 /**
  * {@inheritdoc}
  */
 function __construct()
 {
     parent::__construct(Feed::ATOM);
 }
Esempio n. 17
0
 /**
  * {@inheritdoc}
  */
 public function __construct()
 {
     parent::__construct(Feed::RSS1);
 }
Esempio n. 18
0
 /**
  * @desc Builds a new RSS 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_rss_template);
 }
Esempio n. 19
0
 public function __construct($title, $link, $description = '', $docs = '', $language = 'en-us')
 {
     parent::__construct($title, $link, $description, $docs, $language);
 }
 /**
  * Constructor. Loads parent constructor.
  */
 protected function __construct()
 {
     parent::__construct();
 }
Esempio n. 21
0
 /**
  * {@inheritdoc}
  */
 public function __construct($BOName, $title, $url, $description, $pubDate = null, $id = null, $limit = 10)
 {
     parent::__construct($BOName, $title, $url, $description, $pubDate, $id, $limit);
     $this->docElement = $this->root;
 }
Esempio n. 22
0
 /**
  * Constructor to create a new Atom feed.
  *
  * @param string $title
  * @param string $url
  * @param string $description
  * @param string $pubDate
  * @param int    $id
  *
  * @since 1.0
  */
 public function __construct($title, $url, $description, $pubDate = null, $id = null)
 {
     if (empty($id)) {
         $id = $url;
     }
     if (empty($pubDate)) {
         $pubDate = date('Y-m-d');
     }
     parent::__construct($title, $url, $description, $pubDate, $id);
 }
Esempio n. 23
0
 public function __construct($source)
 {
     parent::__construct();
     $this->source = $source;
 }