Esempio n. 1
0
 static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
<?php

include 'header.php';
$feed = FeedMapper::instance()->find($_GET['id']);
$item_helper = new ItemHelper();
?>

<table>
<th>id</th><th>title</th>

<?php 
foreach ($feed->items() as $item) {
    ?>

<tr>
 <td><?php 
    echo $item->id();
    ?>
</td>
  <td><?php 
    echo $item_helper->link($item);
    ?>
 </td>
</tr>

<?php 
}
?>


Esempio n. 3
0
 function feed()
 {
     return FeedMapper::instance()->find($this->feed_id());
 }
Esempio n. 4
0
 function mapper()
 {
     return FeedMapper::instance();
 }
Esempio n. 5
0
<?php

include 'header.php';
$feeds = FeedMapper::instance()->find_all();
$feed_helper = new FeedHelper();
?>

<table>

<tr><th>id</th><th>title</th><th>feed url</th><th>time to live</th>
 <tr>

<?php 
foreach ($feeds as $feed) {
    ?>
<tr>

<td><?php 
    echo $feed->id();
    ?>
</td>
<td><?php 
    echo $feed_helper->link($feed);
    ?>
</td>
<td><?php 
    echo $feed->feed_url();
    ?>
</td>
<td><?php 
    echo $feed->time_to_live();