/**
  * Constructor
  *
  * Prevent creating instances of this class by making the contructor private
  * 
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     // Set the view indentifier
     $this->_view = $config->view;
     // Set the template stack object
     $this->_stack = $config->stack;
     //Register the template stream wrapper
     KTemplateStream::register();
     //Set shutdown function to handle sandbox errors
     register_shutdown_function(array($this, '__destroy'));
     // Mixin a command chain
     $this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this))));
 }
Example #2
0
 /**
  * Constructor
  *
  * Prevent creating instances of this class by making the contructor private
  * 
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     // Set the table indentifier
     if (isset($config->view)) {
         $this->setView($config->view);
     }
     //Register the template stream wrapper
     KTemplateStream::register();
     //Set the template search paths
     $this->_paths = KConfig::toData($config->paths);
     // Mixin a command chain
     $this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this))));
 }