Gc\Core\Object::offsetGet PHP Метод

offsetGet() публичный Метод

Implementation of ArrayAccess::offsetGet()
public offsetGet ( string $offset ) : mixed
$offset string Offset
Результат mixed
    public function offsetGet($offset)
    {
        return isset($this->data[$offset]) ? $this->data[$offset] : null;
    }

Usage Example

Пример #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testOffsetGet()
 {
     $this->object->setData('k', 'v');
     $this->assertEquals('v', $this->object->offsetGet('k'));
 }