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

getValue() public method

public getValue ( ) : array
return array
    public function getValue() : array
    {
        return deep_clone($this->values);
    }

Usage Example

Beispiel #1
0
 public function testIsImmutable()
 {
     $value = new ChoiceListValue([$std = new \stdClass()]);
     // Mutate input value
     $std->foo = 'bar';
     // Mutate retrieved value
     $value->getValue()[0]->foo = 'baz';
     $this->assertEquals([new \stdClass()], $value->getValue());
 }