ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
$type
Exception type for HTMLPurifier_VarParser.
parseImplementation($var, $type, $allow_null)
Definition: Native.php:17
This variable parser uses PHP&#39;s internal code engine.
Definition: Native.php:8
Parses string representations into their corresponding native PHP variable type.
Definition: VarParser.php:7