src/Arrays/Fluent.php
public function set($key, $value)
	{
		// Get the keys array
		if (is_string($key))
		{
			$keys = explode('.', $key);
		}
		elseif (isArrayLike($key))
		{
			$keys = $key;
		}
		else
		{
			// Assume key not provided, replace entire array with new value.
			$this->items = (array) $value;
			return $this;
		}

		// Start in the root of the array
		$array =& $this->items;

		// Loop through the keys
		while (count($keys) > 1)
		{
			// Get the next key
			$key = array_shift($keys);

			// If the key doesn't exist at this depth, we will just create an
			// empty array to hold the next value, allowing us to create the
			// arrays to hold final values at the correct depth. Then we'll
			// keep digging into the array.
			if (!isset($array[$key]) || !isArrayLike($array[$key]))
			{
				$array[$key] = new static();
			}

			// Recurse into the array
			$array =& $array[$key];
		}

		// Set the new value
		$array[array_shift($keys)] = $value;

		// Return ourselves to allow method chaining
		return $this;
	}
public function set($key, $value)
	{
		// Get the keys array
		if (is_string($key))
		{
			$keys = explode('.', $key);
		}
		elseif (isArrayLike($key))
		{
			$keys = $key;
		}
		else
		{
			// Assume key not provided, replace entire array with new value.
			$this->items = (array) $value;
			return $this;
		}

		// Start in the root of the array
		$array =& $this->items;

		// Loop through the keys
		while (count($keys) > 1)
		{
			// Get the next key
			$key = array_shift($keys);

			// If the key doesn't exist at this depth, we will just create an
			// empty array to hold the next value, allowing us to create the
			// arrays to hold final values at the correct depth. Then we'll
			// keep digging into the array.
			if (!isset($array[$key]) || !isArrayLike($array[$key]))
			{
				$array[$key] = new static();
			}

			// Recurse into the array
			$array =& $array[$key];
		}

		// Set the new value
		$array[array_shift($keys)] = $value;

		// Return ourselves to allow method chaining
		return $this;
	}
Method: set
=========================================================================
Set an item on the collection by key.

For example:

```php
$data = Arr::a();
$data->set('a.b.c', 'd');
echo $data->a->b->c; // outputs: d
```

NOTE: If no key is given to the method, the entire array will be
replaced. This is in keeping with the procedual version of this method.

Parameters:
-------------------------------------------------------------------------
$key - Can be a single key, "dot" separated keys or an array of keys.
$value - The value to set on the collection.

Returns:
-------------------------------------------------------------------------
static