diff options
-rw-r--r-- | app/classes/PlanetItem.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/classes/PlanetItem.php b/app/classes/PlanetItem.php index 039d0ca..7d55781 100644 --- a/app/classes/PlanetItem.php +++ b/app/classes/PlanetItem.php @@ -4,14 +4,19 @@ * Planet item */ -class PlanetItem +class PlanetItem extends SimplePie_Item { public function __construct($feed, $data) { - parent::SimplePie_Item($feed, $data); + parent::__construct($feed, $data); } - public function compare($item1, $item2) + /** + * @param PlanetItem $item1 + * @param PlanetItem $item2 + * @return int + */ + public static function compare($item1, $item2) { $item1_date = $item1->get_date('U'); $item2_date = $item2->get_date('U'); |