DooPHP IRC channel
roman wrote:Francisco, why are you so keen on extending DooView? If you like Smarty so much, can you not keep using it in DooPHP based apps? I enjoy using PHPTAL, and that's what I use with this framework. I have no intention to start using DooView. Thank God, the framework doesn't require any template technology and makes it easy to use whatever one wishes to use.
echo $data['xx']
echo $xx
extract($data);
//$this->data = $data;
magic22cn wrote:Extend DooPHP to compatible with Smarty, why not?
public function view(){
if($this->_view==NULL){
Doo::loadCore('view/DooView');
$this->_view = new DooView;
}
return $this->_view;
}
class BaseMyController extends DooController {
public function view() {
if ($this->_view==null) {
Doo::loadClass('MyDooView');
$this->_view = new MyDooView();
}
return $this->_view;
}
Doo::loadCore('DooView');
class MyDooView extends DooView {
public function renderc($file, $data=NULL, $controller=NULL, $includeTagClass=TRUE){
extract($data);
$this->controller = $controller;
if($includeTagClass===TRUE)
$this->loadTagClass();
include Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . "/viewc/$file.php";
}
}
Doo::loadCore('view/DooView');
class MyView extends DooView {
public function renderc($file, $data=NULL, $controller=NULL, $includeTagClass=TRUE){
//$this->data = $data;
extract($data);
$this->controller = $controller;
if($includeTagClass===TRUE)
$this->loadTagClass();
include Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . "/viewc/$file.php";
}
}
leng wrote:oh.. seems that Richard has posted the answer
leng wrote:DooPHP is not CI.
Users browsing this forum: No registered users and 1 guest