ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Native.php
Go to the documentation of this file.
1<?php
2
9{
10
17 protected function parseImplementation($var, $type, $allow_null)
18 {
19 return $this->evalExpression($var);
20 }
21
27 protected function evalExpression($expr)
28 {
29 $var = null;
30 $result = eval("\$var = $expr;");
31 if ($result === false) {
32 throw new HTMLPurifier_VarParserException("Fatal error in evaluated code");
33 }
34 return $var;
35 }
36}
37
38// vim: et sw=4 sts=4
$result
Exception type for HTMLPurifier_VarParser.
This variable parser uses PHP's internal code engine.
Definition: Native.php:9
parseImplementation($var, $type, $allow_null)
Definition: Native.php:17
Parses string representations into their corresponding native PHP variable type.
Definition: VarParser.php:8