/** * Output the PDF directly to the browser. * * @param boolean $download * @return void */ public function output($download = false) { // Format and finalize the PDF. $this->finalize(); parent::output($download); }
/** * Method to output the SVG image. * * @param boolean $download * @return void */ public function output($download = false) { $dom = new \DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($this->resource->asXML()); $this->output = $dom->saveXML(); parent::output($download); }
/** * Output the code object directly. * * @param boolean $download * @return \Pop\Code\Generator */ public function output($download = false) { $this->render(true); parent::output($download); }
public function testOutput() { if (file_exists(__DIR__ . '/../tmp/file.txt')) { unlink(__DIR__ . '/../tmp/file.txt'); } $f = new File(__DIR__ . '/../tmp/file.txt'); $f->write('123'); $this->setExpectedException('Pop\\Http\\Exception'); $f->output(); }