Gc\Core\Object::offsetSet PHP Method

offsetSet() public method

Implementation of ArrayAccess::offsetSet()
public offsetSet ( string $offset, mixed $value ) : void
$offset string Offset
$value mixed Value
return void
    public function offsetSet($offset, $value)
    {
        $this->data[$offset] = $value;
    }

Usage Example

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