- Renamed TemplateLib to WidgetLib

- Updated controllers and views to use WidgetLib
- Removed TempleteLib from autoload config file
- Removed loading of session library from FHC_Controller (already
present in the autoload configuration file)
This commit is contained in:
Paolo
2017-03-23 12:25:58 +01:00
parent 2c4595005b
commit 2711430eb9
15 changed files with 63 additions and 48 deletions
@@ -24,12 +24,10 @@
* THE SOFTWARE.
*/
if (!defined("BASEPATH"))
exit("No direct script access allowed");
if (!defined("BASEPATH")) exit("No direct script access allowed");
class TemplateLib
class WidgetLib
{
/* default values */
private $_template = 'template';
private $_parser = FALSE;
@@ -604,26 +602,29 @@ class Partial
class Widget extends Partial
{
/* (non-PHPdoc)
* @see Partial::content()
*/
public function content() {
if (!$this->_cached) {
if (method_exists($this, 'display')) {
// capture output
ob_start();
$this->display($this->_args);
$buffer = ob_get_clean();
// if no content is produced but there was direct ouput we set
// that output as content
if (!$this->_content && $buffer) {
$this->set($buffer);
}
}
}
return parent::content();
}
}
/* (non-PHPdoc)
* @see Partial::content()
*/
public function content()
{
if (!$this->_cached)
{
if (method_exists($this, 'display'))
{
// capture output
ob_start();
$this->display($this->_args);
$buffer = ob_get_clean();
// if no content is produced but there was direct ouput we set
// that output as content
if (!$this->_content && $buffer)
{
$this->set($buffer);
}
}
}
return parent::content();
}
}