/** * test array add */ public function testArrayAdd() { $array = array('foo' => array('bar' => array('test' => 'woo'))); $array = CCArr::add('foo.bar.test', 'jep', $array); $this->assertEquals(array('jep'), CCArr::get('foo.bar.test', $array)); $array = CCArr::add('foo.bar.test', 'jepp', $array); $this->assertEquals(array('jep', 'jepp'), CCArr::get('foo.bar.test', $array)); }
/** * Add data to the object * * @param string $key * @param mixed $value * * @return void */ public function add($key, $value) { CCArr::add($key, $value, $this->_data); }