@@ -34,12 +34,12 @@ discard block |
||
| 34 | 34 | protected $filter; |
| 35 | 35 | |
| 36 | 36 | function __construct($s) { |
| 37 | - if(FALSE !== $pos = strpos($s,'|')) { |
|
| 38 | - $this->filter = new Filter(substr($s, $pos+1), $this); |
|
| 39 | - $s = substr($s,0,$pos); |
|
| 37 | + if (FALSE !== $pos = strpos($s, '|')) { |
|
| 38 | + $this->filter = new Filter(substr($s, $pos + 1), $this); |
|
| 39 | + $s = substr($s, 0, $pos); |
|
| 40 | 40 | } |
| 41 | 41 | $s = explode("->", $s); |
| 42 | - if(count($s) == 1) $s = explode("-!",$s[0]); |
|
| 42 | + if (count($s) == 1) $s = explode("-!", $s[0]); |
|
| 43 | 43 | if (!$s[0]) throw new ParseError("Unable to parse Complex Expression"); |
| 44 | 44 | if ($s[0][1] == "(") |
| 45 | 45 | $this->func = new Text\Func($s[0]); |
@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | function toHTML($escape = false) { |
| 55 | - if($escape) |
|
| 56 | - return "<?=htmlspecialchars(" .$this->toPHP() . ")?>"; |
|
| 55 | + if ($escape) |
|
| 56 | + return "<?=htmlspecialchars(" . $this->toPHP() . ")?>"; |
|
| 57 | 57 | return "<?=" . $this->toPHP() . "?>"; |
| 58 | 58 | } |
| 59 | 59 | function toPHP() { |
| 60 | - return $this->filter?$this->filter->toPHP():$this->toPHPVar(); |
|
| 60 | + return $this->filter ? $this->filter->toPHP() : $this->toPHPVar(); |
|
| 61 | 61 | } |
| 62 | 62 | function toPHPVar() { |
| 63 | 63 | if ($this->sel) { |