Youshido\GraphQL\Parser\Ast\ArgumentValue\Variable::getValue PHP Method

getValue() public method

public getValue ( ) : mixed
return mixed
    public function getValue()
    {
        if (null === $this->value) {
            throw new \LogicException('Value is not set for variable "' . $this->name . '"');
        }
        return $this->value;
    }

Usage Example

Example #1
0
 /**
  * @expectedException \LogicException
  * @expectedExceptionMessage Value is not set for variable "foo"
  */
 public function testGetNullValueException()
 {
     $var = new Variable('foo', 'bar', false, false, new Location(1, 1));
     $var->getValue();
 }
All Usage Examples Of Youshido\GraphQL\Parser\Ast\ArgumentValue\Variable::getValue