final function make(IOutput $writeStream) { $this->classMethods = array(); $this->classProperties = array(); $this->findMembers(); $writeStream->write($this->getFileHeader())->write($this->getClassHeader())->write($this->getClassBody())->write($this->getClassFooter())->write($this->getFileFooter()); }
function render(IOutput $output) { $this->assertOutsideRenderingContext(); $this->inRenderingContext = true; $this->output = $output; ob_start(); // isolate inclusion to introduce a clean scope $this->injectLayout(); $output->write(ob_get_clean()); $this->inRenderingContext = false; $this->output = null; }
/** * @return void */ function write(IOutput $output) { $options = array(); foreach ($this->options as $option => $value) { if (!empty($value)) { $options[] = $option . ' = ' . $this->prepareValue($value[0]); foreach (array_slice($value, 1) as $value) { $options[] = $option . ' += ' . $this->prepareValue($value); } } } $output->write(join(StringUtils::DELIM_UNIX, $options)); }
/** * Dumps schema * * @param IOutput $writeStream stream to write the dump to * @param IDialect $dialect database dialect to use * * @return void */ function make(IOutput $writeStream, IDialect $dialect) { $now = date('Y/m/d H:i'); $product = PHOEBIUS_FULL_PRODUCT_NAME; $start = <<<EOT -- -- {$product} -- Generated at {$now} for {$dialect->getDBDriver()->getValue()} -- EOT; $writeStream->write($start)->write($this->dbSchema->toDialectString($dialect)); }
/** * In-place render of a separate UIControl * * @param string $view name of the view to render * @param Model $model optional custom model to pass; if not set, the current model will be passed * * @return void */ protected function renderPartial($view, Model $model = null) { $this->assertInsideRenderingContext(); $presentation = $this->spawn($view, $model); $control = $this->getUserControl($presentation); if ($this->control) { $control->setParentControl($this->control); } $presentation->setUIControl($control); // this is not good to handle output buffering cause the actual implemention // of output buffering can be unknown in the internals of a base class but // this is the only way to implement renderPartial() and we know explicilty how // is the base class implemented $this->output->write(ob_get_clean()); ob_start(); $control->render($this->output); }
/** * @return void */ function write(IOutput $output) { $output->write($this->getHeader())->write($this->getBody())->write($this->getFooter()); }