Nelmio\Alice\Definition\Value\FunctionCallValue::getValue PHP Method

getValue() public method

public getValue ( )
    public function getValue()
    {
        return [$this->name, $this->getArguments()];
    }

Usage Example

示例#1
0
 public function testIsImmutable()
 {
     $arguments = [$arg0 = new \stdClass()];
     $value = new FunctionCallValue('setUsername', $arguments);
     // Mutate injected value
     $arg0->foo = 'bar';
     // Mutate returned value
     $value->getArguments()[0]->foo = 'baz';
     $this->assertEquals([new \stdClass()], $value->getArguments());
     $this->assertEquals(['setUsername', [new \stdClass()]], $value->getValue());
 }