add css
This commit is contained in:
@@ -13,8 +13,9 @@ class Feed extends PhpObject {
|
||||
|
||||
private $asDesc;
|
||||
private $asItems;
|
||||
private $sCssFile;
|
||||
|
||||
public function __construct($asDesc, $asItems=array())
|
||||
public function __construct($asDesc, $asItems=array(), $sCssFile='')
|
||||
{
|
||||
parent::__construct(__CLASS__, Settings::DEBUG);
|
||||
if(!array_key_exists('link', $asDesc))
|
||||
@@ -23,6 +24,7 @@ class Feed extends PhpObject {
|
||||
}
|
||||
$this->asDesc = $asDesc;
|
||||
array_walk($asItems, array($this, 'addItem'));
|
||||
$this->sCssFile = $sCssFile;
|
||||
}
|
||||
|
||||
public function addItem($asItem)
|
||||
@@ -72,6 +74,7 @@ class Feed extends PhpObject {
|
||||
|
||||
//Global Feed
|
||||
$sFeed = '<?xml version="1.0" encoding="'.Settings::TEXT_ENC.'" ?>';
|
||||
if($this->sCssFile!='') $sFeed .= "\n".'<?xml-stylesheet type="text/css" href="'.$this->sCssFile.'"?>';
|
||||
$sFeed .= self::getHtml(self::getHtml($sRssFeedHeader.$sItems, 'channel'), 'rss', '', '', array('version'=>'2.0', 'xmlns:atom'=>'http://www.w3.org/2005/Atom'));
|
||||
|
||||
return $sFeed;
|
||||
|
||||
Reference in New Issue
Block a user