boka3/include/Responder.php
Erik Thuning 692c2e0aeb Broke all classes into separate files and activated class autoloading.
All free functions are now in functions.php
2019-06-11 17:05:48 +02:00

32 lines
980 B
PHP

<?php
abstract class Responder {
protected $fragments = array();
public function __construct() {
$this->fragments = get_fragments('./html/fragments.html');
}
final protected function escape_tags($tags) {
foreach($tags as $key => $tag) {
$tags[$key] = str_replace(array("'",
'"'),
array('&#39;',
'&#34;'),
strtolower($tag));
}
return $tags;
}
final protected function unescape_tags($tags) {
foreach($tags as $key => $tag) {
$tags[$key] = str_replace(array('&#39;',
'&#34;'),
array("'",
'"'),
strtolower($tag));
}
return $tags;
}
}
?>