public function PrintHTML($html, App_Model_Abstract $model = null) { $text = str_replace(array('<body class="scayt-enabled">', '<html>', '</html>', '<head>', '</head>', '<title>', '</title>', '<body>', '</body>'), '', $html); $dataKey = array(); $dataValue = array(); if ($model != null) { $properties = array_keys($model->getProperties()); foreach ($properties as $pop) { $dataKey[] = "@show_{$pop}"; $dataValue[] = $model->{$pop}; } } $dataKey[] = " "; $dataValue[] = " "; $text = str_replace($dataKey, $dataValue, $text); return $text; }