예제 #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();
     }
 }
예제 #2
0
파일: parse.php 프로젝트: komagata/plnet
<?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());