Exemple #1
0
 /**
  * Creates a new module.
  * @param Controller $controller Controller which constructed the module. Usually unused. Potential subject to removal.
  * @param string     $name       Name of the module
  * @param string     $tpl        Module template
  */
 public function __construct($controller, $name, $tpl = 'default')
 {
     parent::__construct('');
     $this->controller = $controller;
     $this->name = $name;
     $this->tpl = $tpl;
 }
Exemple #2
0
 /**
  * Constructs a new view with a particular name. The view name is the same as the HTML template file's name.
  * @param Controller $controller Associated controller
  * @param string     $name       of the view
  * @param string     $type       Render type of the view. Defaults to html.
  */
 public function __construct($controller, $name, $type = 'html')
 {
     parent::__construct('');
     if (!$controller instanceof Controller) {
         throw new InvalidArgumentException('Expected parameter 1 (controller) to be a Controller');
     }
     $this->controller = $controller;
     $this->name = $name;
     $this->type = $type;
 }
Exemple #3
0
 /**
  * Erzeugt eine neue generische HTML-Vorlage (mit PHP-Unterstützung).
  * @param Controller $controller Zugehöriger Kontroller.
  * @param string     $name       Name dieser Vorlage. Verwendet, um sie von dem Dateisystem zu laden.
  */
 public function __construct($controller, $name)
 {
     parent::__construct('');
     $this->controller = $controller;
     $this->name = $name;
 }