Esempio n. 1
0
 function parse()
 {
     $feed = DB_DataObject::factory('feed');
     $feed->uri = $this->uri;
     // was cached
     if ($feed->count() > 0) {
         $this->struct = $this->_getCache($this->uri);
         // no cache
     } else {
         $f = new FeedParser($this->uri);
         $f->parse();
         $this->struct = $f->toArray();
     }
 }
Esempio n. 2
0
<?php

require_once dirname(dirname(__FILE__)) . '/webapp/config.php';
require_once 'FeedParser.php';
$uri = $_SERVER['argv'][1];
$feed = new FeedParser($uri);
$res = $feed->parse();
print_r($feed->toArray());