__construct() public method

创建Feed对象
public __construct ( string $charset = 'UTF-8' )
$charset string
Exemplo n.º 1
0
 /**
  * @constructor
  */
 public function __construct($config)
 {
     $config['url'] = sprintf('http://github.com/%s.atom', $config['username']);
     $config['link'] = 'http://github.com/' . $config['username'] . '/';
     parent::__construct($config);
     $this->setItemTemplate('<li class="clearfix"><a href="{%link%}">{%title%}</a></li>' . "\n");
 }
Exemplo n.º 2
0
 /**
  * @constructor
  */
 public function __construct($config)
 {
     $config['url'] = sprintf('http://github.com/%s.atom', $config['username']);
     $config['link'] = 'http://github.com/' . $config['username'] . '/';
     parent::__construct($config);
     $this->setItemTemplate('<li class="clearfix"><a href="{{{link}}}">{{{title}}}</a>{{{content}}}<div style="text-align:right"><small>{{{date}}}</small></div></li>' . "\n");
 }
Exemplo n.º 3
0
 public function __construct($config)
 {
     $config['link'] = 'http://www.google.com/profiles/' . $config['username'] . '#buzz';
     $config['url'] = 'http://buzz.googleapis.com/feeds/' . $config['username'] . '/public/posted';
     parent::__construct($config);
     $this->setItemTemplate('<li><div>{{{content}}}</div><div style="text-align:right"><small><a href="{{{link}}}"> {{{date}}}</a></small></div></li>' . "\n");
 }
Exemplo n.º 4
0
 public function __construct($config)
 {
     $config['url'] = sprintf('http://gdata.youtube.com/feeds/api/users/%s/uploads?v=2', $config['username']);
     $config['link'] = 'http://www.youtube.com/user/' . $config['username'] . '/';
     parent::__construct($config);
     $this->size = $config['size'];
     $this->setItemTemplate('<li class="clearfix"><a href="{%link%}"><img src="{%image%}" alt="{%title%}" /><strong>{%title%}</strong></a></li>' . "\n");
 }
Exemplo n.º 5
0
 function __construct($xml = null)
 {
     parent::__construct($xml);
 }
Exemplo n.º 6
0
 public function __construct($config)
 {
     $this->size = $config['size'];
     parent::__construct($config);
     $this->setItemTemplate('<li class="clearfix"><a href="{{{link}}}"><img src="{{{image}}}" alt="{{{title}}}" /><strong>{{{title}}}</strong></a></li>' . "\n");
 }