1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00
Files
archived-phd/tests/xhtml/TestChunkedXHTML.php
2024-02-08 12:46:21 +00:00

37 lines
928 B
PHP

<?php
namespace phpdotnet\phd;
class TestChunkedXHTML extends Package_Generic_ChunkedXHTML {
public function update($event, $val = null) {
switch($event) {
case Render::CHUNK:
parent::update($event, $val);
break;
case Render::STANDALONE:
parent::update($event, $val);
break;
case Render::INIT:
$this->setOutputDir(Config::output_dir() . strtolower($this->getFormatName()) . '/');
break;
//No verbose
}
}
public function writeChunk($id, $fp) {
$filename = $this->getOutputDir() . $id . $this->getExt();
rewind($fp);
$content = "\n";
$content .= stream_get_contents($fp);
if ($id === "") {
$filename = Config::xml_file();
}
echo "Filename: " . basename($filename) . "\n";
echo "Content:" . $content . "\n";
}
}