public function compile(UI $aUi) { if ($this->aCompiled) { return; } if ($this->nKind == self::code) { $aOutput = new OutputStreamBuffer(); $aUi->compile(new InputStreamCache($this->sCode), $aOutput, null, false); $this->aCompiled = new String($aOutput->bufferBytes()); } else { if ($this->nKind == self::template) { $this->aCompiled = new String("\n// 织入模板: {$this->sTemplate}----------------------\n\$this->display(\"{$this->sTemplate}\",\$aVariables,\$aDevice) ;\n// -------------------------------------------------------------------------\n"); } else { if ($this->nKind == self::filter) { // nothing todo } } } }
/** * return UI */ public function create() { $aUI = new UI($this); $aUI->setApplication($this->application(true)); return $aUI; }