コード例 #1
0
    public function testArgsPhpGetArglistPhp()
    {
        static::assertSame('
  new \\stdClass,
  5,
  "x",
  foo(
    4,
    5),
  \'A
B\'', CodegenUtil::argsPhpGetArglistPhp(array('new \\stdClass', '5', '"x"', "foo(\n  4,\n  5)", var_export("A\nB", TRUE))));
        static::assertSame('', CodegenUtil::argsPhpGetArglistPhp(array()));
    }
 /**
  * @param string[] $argsPhp
  *   PHP statements for each parameter.
  *
  * @return string
  *   PHP statement.
  */
 public function argsPhpGetPhp(array $argsPhp)
 {
     $arglistPhp = CodegenUtil::argsPhpGetArglistPhp($argsPhp);
     return 'new \\' . $this->reflClass->getName() . '(' . $arglistPhp . ')';
 }
 /**
  * @param string[] $argsPhp
  *   PHP statements for each parameter.
  *
  * @return string
  *   PHP statement.
  */
 public function argsPhpGetPhp(array $argsPhp)
 {
     $arglistPhp = CodegenUtil::argsPhpGetArglistPhp($argsPhp);
     return '\\' . $this->reflMethod->getDeclaringClass()->getName() . '::' . $this->reflMethod->getName() . '(' . $arglistPhp . ')';
 }