require_once dirname(__FILE__) . '/banana.inc.php';
-define('BANANA_FEED_VERSION', '0.1');
+define('BANANA_FEED_VERSION', '0.1.1');
class BananaFeed
{
*/
public $lastupdate = 0;
+ /** Path where the feed is stored
+ */
+ public $path = null;
+
/** Create an empty feed
*/
private function __construct()
}
uasort($this->messages, Array('BananaFeed', 'compare'));
$this->lastupdate = time();
- $this->writeToFile();
+ $this->saveToFile();
}
/** Get the spool corresponding with the current settings of Banana
*/
static private function filename()
{
- $file = Banana::$spool_root . '/' . Banana::$protocole->name() . '/';
- if (!is_dir($file)) {
- mkdir($file);
- }
- return $file . Banana::$protocole->filename() . '_feed';
+ return BananaSpool::getPath('feed');
}
/** Read a feed from a cache file
/** Write a feed to a cache file
*/
- private function writeToFile()
+ private function saveToFile()
{
$file = BananaFeed::filename();
file_put_contents($file, serialize($this));
/** Merge to feeds into a new one
*/
- static public function &merge(&$feed1, &$feed2, $name, $description = null)
+ static public function &merge($feed1, $feed2, $name, $description = null)
{
if (!$feed1) {
$feed = null;
}
}
-// vim:set et sw=4 sts=4 ts=4 enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 fenc=utf-8:
?>