Gc\Core\Object::offsetGet PHP Method

offsetGet() public method

Implementation of ArrayAccess::offsetGet()
public offsetGet ( string $offset ) : mixed
$offset string Offset
return mixed
    public function offsetGet($offset)
    {
        return isset($this->data[$offset]) ? $this->data[$offset] : null;
    }

Usage Example

Esempio n. 1
0
 /**
  * Test
  *
  * @return void
  */
 public function testOffsetGet()
 {
     $this->object->setData('k', 'v');
     $this->assertEquals('v', $this->object->offsetGet('k'));
 }