Beispiel #1
0
 /**
  * Sets the layout template file to use.
  *
  * @param  string $layout Path to the layout template file, relative to
  *                        the template path.
  */
 public function setLayout($layout = '')
 {
     if ($layout === '') {
         $layout = 'layouts/empty.php';
     }
     if (file_exists(RPG_Template::getPath() . "/{$layout}")) {
         $this->_layout = RPG::template($layout);
     } else {
         throw new RPG_Exception('Specified layout "' . $layout . '" does not exist.');
     }
     $this->setContent('');
     return $this;
 }