Ejemplo n.º 1
0
 protected function buildAtomFeed()
 {
     $this->tag_list->setPhotoWhereClause(sprintf('PinholePhoto.status = %s', $this->app->db->quote(PinholePhoto::STATUS_PUBLISHED, 'integer')));
     $this->tag_list->setPhotoOrderByClause('PinholePhoto.publish_date desc, id desc');
     $site_base_href = $this->app->getBaseHref();
     $this->feed = new XML_Atom_Feed($this->getPinholeBaseHref(), $this->app->config->site->title);
     $this->feed->addLink($site_base_href . $this->source, 'self', 'application/atom+xml');
     $this->feed->setGenerator('Pinhole');
     $this->feed->setBase($site_base_href);
     //$author_uri = '';
     //$this->feed->addAuthor($this->post->author->name, $author_uri,
     //	$this->post->author->email);
     $this->buildAtomPagination();
     $photos = $this->tag_list->getPhotos($this->dimension->shortname, array('PinholePhoto.description'));
     foreach ($photos as $photo) {
         $this->feed->addEntry($this->getEntry($photo));
     }
 }
Ejemplo n.º 2
0
 protected function buildHeader(XML_Atom_Feed $feed)
 {
     $feed->setGenerator('Blörg');
     $feed->setBase($this->app->getBaseHref());
     $feed->addLink($this->app->getBaseHref() . $this->source, 'self', 'application/atom+xml');
 }