src/Core/Base.php
public function arraySet(array &$array, $identifier, $value) {
		// create reference
		$returner =& $array;
		
		foreach (explode('.', $identifier) as $part) {
			if (!isset($returner[$part])) {
				$returner[$part] = '';
			}
			$returner =& $returner[$part];
		}
		
		$returner = $value;
	}
public function arraySet(array &$array, $identifier, $value) {
		// create reference
		$returner =& $array;
		
		foreach (explode('.', $identifier) as $part) {
			if (!isset($returner[$part])) {
				$returner[$part] = '';
			}
			$returner =& $returner[$part];
		}
		
		$returner = $value;
	}
public function arraySet ( array & $ array , $ identifier , $ value ) { // create reference $ returner = & $ array ; foreach ( explode ( '.' , $ identifier ) as $ part ) { if ( ! isset ( $ returner [ $ part ] ) ) { $ returner [ $ part ] = '' ; } $ returner = & $ returner [ $ part ] ; } $ returner = $ value ; }
Sets a branch or a value of a multidimensional array tree by use of the dot syntax to define subnodes.

Usage example:

~~~{.php}
class Dummy extends \Morrow\Core\Base {
public function foo() {
$data = [
0 => [
'title' => 'Foo',
'position' => 1,
],
1 => [
'title' => 'Bar',
'position' => 0,
],
];

return $this->arraySet($data, '1.children', [0 => ['title' => 'FooBar', 'position' => 0]]);
}
}
~~~

@param  array $array The input array which should be extended.
@param  string $identifier A string of array keys separated by dots.
@param  mixed $value The data to be set.
@return null
Sets a branch or a value of a multidimensional array tree by use of the dot syntax to define subnodes .