Exemplo n.º 1
0
 public function __construct(&$view = null)
 {
     $this->stf = STF::getInstance();
     if ($view !== null) {
         $this->view =& $view;
     }
     $this->content_path = $this->stf->getConfig('app.content');
     echo '<pre>' . __CLASS__ . ' $this->content_path: ' . print_r($this->content_path, true) . "</pre>\n";
 }
Exemplo n.º 2
0
 /**
  * Class constructor method
  * 
  * @param  string $views_path       Full base path to the views
  * @param  string $partials_path    Optional full base path to the partials
  * @param  array  $mustache_options Optional named array of options to pass to Mustache.
  */
 public function __construct(&$controller = null)
 {
     $this->props['initialized'] = 5;
     // Read & isset
     $this->log = new Logger(Logger::LOG_LEVEL_WARN);
     $this->log->css_class = 'logger';
     $this->log->css_inline = 'color:#000';
     // $this->log->echo_output = true;
     // $this->log->echo_html = true;
     $this->log->file_output = true;
     $this->log->info();
     $this->stf =& STF::getInstance();
 }
Exemplo n.º 3
0
 public function __construct($uri = null)
 {
     $this->host = $uri->getHost();
     $this->path = $uri->getPath();
     $this->stf =& STF::getInstance();
     $config = $this->stf->getConfig('route.default');
     echo '<pre>' . __CLASS__ . ' $this->host: ' . print_r($this->host, true) . "</pre>\n";
     echo '<pre>' . __CLASS__ . ' $this->path: ' . print_r($this->path, true) . "</pre>\n";
     echo '<pre>' . __CLASS__ . ' $config: ' . print_r($config, true) . "</pre>\n";
     // $this->view = new $config['view']($this);
     // $this->model = new $config['model']($this->view);
     $this->view = new BlogView($this);
     $this->model = new BlogModel($this->blogView);
     // $this->view->init();
     $model_settings = array();
     $model_settings['host'] = $this->host;
     $model_settings['path'] = $this->path;
     $this->model->init($model_settings);
 }
Exemplo n.º 4
0
 public function __construct(&$controller = null)
 {
     $this->stf = STF::getInstance();
 }