299 {
303 } else {
305 }
307
309 $def =
$config->def->info[
"$ns.$directive"];
310 if (is_int($def)) {
311 $type = abs($def);
312 } else {
313 $type = $def->type;
314 }
315 if (is_array($value)) {
316 switch ($type) {
318 $array = $value;
319 $value = array();
320 foreach ($array as $val => $b) {
321 $value[] = $val;
322 }
323
325 $value = implode(PHP_EOL, $value);
326 break;
328 $nvalue = '';
329 foreach ($value as $i => $v) {
330 $nvalue .= "$i:$v" . PHP_EOL;
331 }
332 $value = $nvalue;
333 break;
334 default:
335 $value = '';
336 }
337 }
339 return 'Not supported';
340 $value = serialize($value);
341 }
342 $attr = array(
343 'name' => "$name" . "[$ns.$directive]",
344 'id' => "$name:$ns.$directive"
345 );
346 if ($value === null) {
347 $attr['disabled'] = 'disabled';
348 }
349 if (isset($def->allowed)) {
351 foreach ($def->allowed as $val => $b) {
352 $attr = array();
353 if ($value == $val) {
354 $attr['selected'] = 'selected';
355 }
357 }
368 $ret .= $this->
end(
'textarea');
369 } else {
370 $attr['value'] = $value;
371 $attr['type'] = 'text';
373 }
375 }
element($tag, $contents, $attr=array(), $escape=true)
Prints a complete element with content inside.
end($tag)
Returns an end tag.
elementEmpty($tag, $attr=array())
prepareGenerator($config)
Give generator necessary configuration if possible.
start($tag, $attr=array())
Main function that renders object or aspect of that object.