getDate($user); @$datetext = new Date($date); @$datetext = $datetext->format('%e %B %Y'); $profile = $user->profile(); $infos[] = array('operation' => $op, 'title' => '[' . $op->getTitle(1) . '] - ' . $user->fullName() . ' le ' . $datetext, 'author' => $user->fullName(), 'publication' => $op->publicationDate($user), 'date' => strtotime($date), 'id' => $op->flag . '-' . $user->id() . '-' . strtotime($date), 'data' => $op->getData($user), 'hruid' => $user->login(), 'dead' => $user->deathdate, 'profile' => $user->profile()->hrid(), 'link' => Platal::globals()->baseurl . '/profile/' . $profile->hrid(), 'user' => $user, 'contact' => $owner->isContact($profile)); } } $this->it = PlIteratorUtils::fromArray($infos); } public function next() { $data = $this->it->next(); return $data['value']; } public function total() { return $this->it->total(); } public function first() { return $this->it->first(); } public function last() { return $this->it->last(); } } class CarnetFeed extends PlFeed { public function __construct() { global $globals; parent::__construct($globals->core->sitename . ' :: Carnet', $globals->baseurl . '/carnet/panel', 'Ton carnet polytechnicien', $globals->baseurl . '/images/logo.png', 'carnet/rss.tpl'); } protected function fetch(PlUser $user) { return new CarnetFeedIterator($user); } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>