32 lines
980 B
PHP
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(''',
|
|
'"'),
|
|
strtolower($tag));
|
|
}
|
|
return $tags;
|
|
}
|
|
|
|
final protected function unescape_tags($tags) {
|
|
foreach($tags as $key => $tag) {
|
|
$tags[$key] = str_replace(array(''',
|
|
'"'),
|
|
array("'",
|
|
'"'),
|
|
strtolower($tag));
|
|
}
|
|
return $tags;
|
|
}
|
|
}
|
|
?>
|