10 defined(
'JPATH_PLATFORM') or die;
12 jimport('joomla.filesystem.path');
29 protected $layout =
'default';
47 public function __construct(
JModel $model, SplPriorityQueue $paths = null)
49 parent::__construct($model);
52 $this->paths = isset($paths) ? $paths : $this->loadPaths();
62 public function __toString()
64 return $this->render();
77 public function escape($output)
80 return htmlspecialchars($output, ENT_COMPAT,
'UTF-8');
90 public function getLayout()
104 public function getPath($layout)
122 public function getPaths()
135 public function render()
138 $path = $this->getPath($this->getLayout());
143 throw new RuntimeException(
'Layout Path Not Found');
153 $output = ob_get_clean();
167 public function setLayout($layout)
169 $this->layout = $layout;
183 public function setPaths(SplPriorityQueue $paths)
185 $this->paths = $paths;
197 protected function loadPaths()
199 return new SplPriorityQueue;