Neos\Flow\Persistence\Generic\QueryResult::offsetGet PHP Method

offsetGet() public method

See also: ArrayAccess::offsetGet()
public offsetGet ( mixed $offset ) : mixed
$offset mixed
return mixed
    public function offsetGet($offset)
    {
        $this->initialize();
        return isset($this->queryResult[$offset]) ? $this->queryResult[$offset] : null;
    }

Usage Example

 /**
  * @test
  */
 public function offsetSetWorksAsExpected()
 {
     $this->queryResult->offsetSet(0, ['foo' => 'FooOverridden', 'bar' => 'BarOverridden']);
     $this->assertEquals(['foo' => 'FooOverridden', 'bar' => 'BarOverridden'], $this->queryResult->offsetGet(0));
 }