Nelmio\Alice\Definition\Property::getValue PHP Method

getValue() public method

public getValue ( ) : Nelmio\Alice\Definition\ValueInterface | mixed
return Nelmio\Alice\Definition\ValueInterface | mixed
    public function getValue()
    {
        return $this->value;
    }

Usage Example

Ejemplo n.º 1
0
 public function testIsMutable()
 {
     $value = new \stdClass();
     $definition = new Property('username', $value);
     // Mutate injected value
     $value->foo = 'bar';
     // Mutate returned value
     $definition->getValue()->ping = 'pong';
     $expected = StdClassFactory::create(['foo' => 'bar', 'ping' => 'pong']);
     $actual = $definition->getValue();
     $this->assertEquals($expected, $actual);
 }
All Usage Examples Of Nelmio\Alice\Definition\Property::getValue