Changeset 2532
Author: Johan Janssens
(2010/09/03 20:34) Over 1 year ago
Renamed path class variable to paths and improved the sandbox to prevent the $path and $data variables variables from overwriting variables that are being pushed into the sandbox.
protected $_paths = array();$this->_path = $config->path;$this->_paths = $config->paths;$this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this))));$this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this))));{{'paths' => array(),{{array_push( $this->_paths, dirname($path));{{extract($data, EXTR_SKIP); //extract the data in local scope//Set the path and data in object scope$this->path = $path;$this->data = $data;//Set the template in the template registry//Remove the path and data from local scopeKFactory::get('lib.koowa.template.registry')->set($path, $this);unset($data);unset($path);//Set the template in the template registryKFactory::get('lib.koowa.template.registry')->set($this->path, $this);extract($this->data, EXTR_SKIP); //extract the data in local scopeinclude 'tmpl://'.$this->path;KFactory::get('lib.koowa.template.registry')->del($path);KFactory::get('lib.koowa.template.registry')->del($this->path);if(!$append) {if(!$append) {array_unshift( $this->_paths, $dir);} else {} else {array_push( $this->_paths, $dir);foreach ($this->_paths as $path){{