getData() public method

If $key is empty will return all the data as an array Otherwise it will return value of the attribute specified by $key If $index is specified it will assume that attribute data is an array and retrieve corresponding member.
public getData ( string $key = '', string | integer $index = null ) : mixed
$key string key
$index string | integer Index
return mixed
示例#1
0
 /**
  * Test
  *
  * @return void
  */
 public function testOffsetUnset()
 {
     $this->object->setData('k', 'v');
     $this->object->offsetUnset('k');
     $this->assertNull($this->object->getData('k'));
 }