/** * Module Logic * * @return void */ public function execute() { if (!empty($this->args[1])) { $this->args[0] .= "', '" . str_replace('\'', '"', $this->args[1]); } HTML\Generator::call('script', array(str_replace(':UA:', $this->args[0], self::JS)), array('compress', 'inlineInner', 'noCache')); }
/** * Module Logic * * @return void */ public function execute() { $ckbxs = $this->args[0]; $checked = $this->args[1]; $i = 1; foreach ($ckbxs as $name => $label) { $ckd = false; if (in_array($i, $checked, true) || in_array($name, $checked)) { $ckd = true; } HTML\Generator::call('checkbox', array($name, $label, $ckd)); $i++; } }
/** * This is where the magic happens. * * Catch all method calls to unknown methods and pass them * to the Generator. * * @param string $name the called method * @param array $arguments passed arguments * * @return mixed Xiphe\HTML or whatever the generator returns. */ public function __call($name, $arguments) { Core\Config::setHTMLInstance($this); $r = Core\Generator::call($name, $arguments); if (!empty($r)) { return $r; } return $this; }