public function build() { parent::build(); header('Content-Type: ' . $this->photo->getMimeType($this->dimension_shortname)); readfile($this->photo->getFilePath($this->dimension_shortname)); exit; }
/** * Creates a new Atom post page * * @param SiteWebApplication $app the application. * @param SiteLayout $layout * @param string $dimension_shortname */ public function __construct(SiteWebApplication $app, SiteLayout $layout, array $arguments = array()) { $layout = new SiteLayout($app, 'Site/layouts/xhtml/atom.php'); parent::__construct($app, $layout, $arguments); $tags = SiteApplication::initVar('tags'); $this->createTagList($tags); $this->dimension = $this->initDimension($this->getArgument('dimension_shortname')); }
/** * Creates a new author index page * * @param SiteWebApplication $app the application. * @param SiteLayout $layout */ public function __construct(SiteWebApplication $app, SiteLayout $layout, array $arguments = array()) { parent::__construct($app, $layout, $arguments); $instance_id = $this->app->getInstanceId(); $sql = sprintf('select * from BlorgAuthor where instance %s %s and visible = %s', SwatDB::equalityOperator($instance_id), $this->app->db->quote($instance_id, 'integer'), $this->app->db->quote(true, 'boolean')); $this->authors = SwatDB::query($this->app->db, $sql, SwatDBClassMap::get('BlorgAuthorWrapper')); }
public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array()) { parent::__construct($app, $layout, $arguments); $year = $this->getArgument('year'); $month_name = $this->getArgument('month_name'); $this->initPosts($year, $month_name); $this->year = intval($year); $this->month = BlorgPageFactory::$months_by_name[$month_name]; }
function main() { switch (REDIRECT_URL) { case "/initialise/": $page = new InitialisationPage(); break; default: if (string_startsWith(REDIRECT_URL, "/api/")) { $page = new APIPage(); } else { $page = new SitePage(); } } if (isset($page)) { $page->render(); } return 0; }
public function build() { parent::build(); if (!$this->app->config->pinhole->search_engine_indexable) { $this->displayDisallowString(); } else { $this->displayGeneralRules(); } exit; }
public function finalize() { parent::finalize(); $this->layout->addHtmlHeadEntrySet($this->ui->getRoot()->getHtmlHeadEntrySet()); }
public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array()) { $layout = new SiteLayout($app, 'Site/layouts/xhtml/fileloader.php'); parent::__construct($app, $layout, $arguments); $this->initFile($this->getArgument('filename')); }
public function finalize() { parent::finalize(); if ($this->pager !== null) { $this->layout->addHtmlHeadEntrySet($this->pager->getHtmlHeadEntrySet()); } }
public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array()) { $layout = new SiteLayout($app, 'Site/layouts/xhtml/atom.php'); parent::__construct($app, $layout, $arguments); }
public function finalize() { parent::finalize(); if ($this->author->openid_server != '') { $this->layout->addHtmlHeadEntry(new SwatLinkHtmlHeadEntry($this->author->openid_server, 'openid.server')); } if ($this->author->openid_delegate != '') { $this->layout->addHtmlHeadEntry(new SwatLinkHtmlHeadEntry($this->author->openid_delegate, 'openid.delegate')); } if ($this->pager !== null) { $this->layout->addHtmlHeadEntrySet($this->pager->getHtmlHeadEntrySet()); } }
public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array()) { $layout = new SiteLayout($app, 'Blorg/layouts/xhtml/ajax-proxy.php'); parent::__construct($app, $layout, $arguments); $this->initUri($this->getArgument('source')); }
public function init() { parent::init(); $this->initComments($this->getArgument('page')); }
public function finalize() { parent::finalize(); $this->layout->addHtmlHeadEntrySet($this->ui->getRoot()->getHtmlHeadEntrySet()); if (count($this->tag_list) > 0) { $this->layout->data->feed_link = 'feed?' . $this->tag_list->__toString(); } }
public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array()) { parent::__construct($app, $layout, $arguments); $this->inityears(); }
/** * Creates a new archive page * * @param SiteWebApplication $app the application. * @param SiteLayout $layout */ public function __construct(SiteWebApplication $app, SiteLayout $layout) { parent::__construct($app, $layout); $this->initTags(); }