/** * {@inheritdoc} */ public function compile(Compiler $compiler) { $compiler->write('$mapper->extendType(')->string($this->parentTypeName)->raw(', ')->string($this->typeName)->raw(', ')->run(function () use($compiler) { $converter = null; if (isset($this->definition['options']['converter'])) { $converter = $this->definition['options']['converter']; } $compiler->repr($converter); })->raw(', ')->run(function () use($compiler) { $normalizer = null; if (isset($this->definition['options']['normalizer'])) { $normalizer = $this->definition['options']['normalizer']; } $compiler->repr($normalizer); })->raw(');'); }
/** * {@inheritdoc} */ public function compile(Compiler $compiler) { $compiler->raw('new \\')->raw($this->class)->raw('(')->each($this->arguments, function ($argument, Loop $loop) use($compiler) { $compiler->repr($argument); if ($loop->isNotLast()) { $compiler->raw(', '); } })->raw(')'); }
/** * {@inheritdoc} */ public function compile(Compiler $compiler) { $compiler->repr($this->value); }