| @@ 68-79 (lines=12) @@ | ||
| 65 | return new self($name, $arguments); |
|
| 66 | } |
|
| 67 | ||
| 68 | protected function compileCode(&$code) |
|
| 69 | { |
|
| 70 | if ($this->name instanceof ValueExpression) { |
|
| 71 | $code .= $this->name->getValue(); |
|
| 72 | } else { |
|
| 73 | $this->name->compileCode($code); |
|
| 74 | } |
|
| 75 | ||
| 76 | $code .= '('; |
|
| 77 | $code .= implode(',', self::compileAll($this->arguments)); |
|
| 78 | $code .= ')'; |
|
| 79 | } |
|
| 80 | ||
| 81 | public function serialize() |
|
| 82 | { |
|
| @@ 71-82 (lines=12) @@ | ||
| 68 | return new self($class, $name, $arguments); |
|
| 69 | } |
|
| 70 | ||
| 71 | protected function compileMember(&$code) |
|
| 72 | { |
|
| 73 | if ($this->name instanceof ValueExpression) { |
|
| 74 | $code .= $this->name->getValue(); |
|
| 75 | } else { |
|
| 76 | $this->name->compileCode($code); |
|
| 77 | } |
|
| 78 | ||
| 79 | $code .= '('; |
|
| 80 | $code .= implode(',', self::compileAll($this->arguments)); |
|
| 81 | $code .= ')'; |
|
| 82 | } |
|
| 83 | ||
| 84 | protected function updateClassValue(Expression $class) |
|
| 85 | { |
|
| @@ 60-69 (lines=10) @@ | ||
| 57 | return new self($name); |
|
| 58 | } |
|
| 59 | ||
| 60 | protected function compileCode(&$code) |
|
| 61 | { |
|
| 62 | if ($this->name instanceof ValueExpression && self::isNormalSyntaxName($this->name->getValue())) { |
|
| 63 | $code .= '$' . $this->name->getValue(); |
|
| 64 | } else { |
|
| 65 | $code .= '${'; |
|
| 66 | $this->name->compileCode($code); |
|
| 67 | $code .= '}'; |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | public function serialize() |
|
| 72 | { |
|