public function append($path, $value)
	{
		$result = null;

		/*
		 * Explode the registry path into an array and remove empty
		 * nodes that occur as a result of a double dot. ex: joomla..test
		 * Finally, re-key the array so they are sequential.
		 */
		$nodes = array_values(array_filter(explode('.', $path), 'strlen'));

		if ($nodes)
		{
			// Initialize the current node to be the registry root.
			$node = $this->data;

			// Traverse the registry to find the correct node for the result.
			// TODO Create a new private method from part of code below, as it is almost equal to 'set' method
			for ($i = 0, $n = \count($nodes) - 1; $i <= $n; $i++)
			{
				if (\is_object($node))
				{
					if (!isset($node->{$nodes[$i]}) && ($i !== $n))
					{
						$node->{$nodes[$i]} = new \stdClass;
					}

					// Pass the child as pointer in case it is an array
					$node = &$node->{$nodes[$i]};
				}
				elseif (\is_array($node))
				{
					if (($i !== $n) && !isset($node[$nodes[$i]]))
					{
						$node[$nodes[$i]] = new \stdClass;
					}

					// Pass the child as pointer in case it is an array
					$node = &$node[$nodes[$i]];
				}
			}

			if (!\is_array($node))
			{
				// Convert the node to array to make append possible
				$node = get_object_vars($node);
			}

			$node[] = $value;
			$result = $value;
		}

		return $result;
	}
public function append($path, $value)
	{
		$result = null;

		/*
		 * Explode the registry path into an array and remove empty
		 * nodes that occur as a result of a double dot. ex: joomla..test
		 * Finally, re-key the array so they are sequential.
		 */
		$nodes = array_values(array_filter(explode('.', $path), 'strlen'));

		if ($nodes)
		{
			// Initialize the current node to be the registry root.
			$node = $this->data;

			// Traverse the registry to find the correct node for the result.
			// TODO Create a new private method from part of code below, as it is almost equal to 'set' method
			for ($i = 0, $n = \count($nodes) - 1; $i <= $n; $i++)
			{
				if (\is_object($node))
				{
					if (!isset($node->{$nodes[$i]}) && ($i !== $n))
					{
						$node->{$nodes[$i]} = new \stdClass;
					}

					// Pass the child as pointer in case it is an array
					$node = &$node->{$nodes[$i]};
				}
				elseif (\is_array($node))
				{
					if (($i !== $n) && !isset($node[$nodes[$i]]))
					{
						$node[$nodes[$i]] = new \stdClass;
					}

					// Pass the child as pointer in case it is an array
					$node = &$node[$nodes[$i]];
				}
			}

			if (!\is_array($node))
			{
				// Convert the node to array to make append possible
				$node = get_object_vars($node);
			}

			$node[] = $value;
			$result = $value;
		}

		return $result;
	}
public function append ( $ path , $ value ) { $ result = null ; /*
		 * Explode the registry path into an array and remove empty
		 * nodes that occur as a result of a double dot. ex: joomla..test
		 * Finally, re-key the array so they are sequential.
		 */ $ nodes = array_values ( array_filter ( explode ( '.' , $ path ) , 'strlen' ) ) ; if ( $ nodes ) { // Initialize the current node to be the registry root. $ node = $ this -> data ; // Traverse the registry to find the correct node for the result. // TODO Create a new private method from part of code below, as it is almost equal to 'set' method for ( $ i = 0 , $ n = \ count ( $ nodes ) - 1 ; $ i <= $ n ; $ i ++ ) { if ( \ is_object ( $ node ) ) { if ( ! isset ( $ node -> { $ nodes [ $ i ] } ) && ( $ i !== $ n ) ) { $ node -> { $ nodes [ $ i ] } = new \ stdClass ; } // Pass the child as pointer in case it is an array $ node = & $ node -> { $ nodes [ $ i ] } ; } elseif ( \ is_array ( $ node ) ) { if ( ( $ i !== $ n ) && ! isset ( $ node [ $ nodes [ $ i ] ] ) ) { $ node [ $ nodes [ $ i ] ] = new \ stdClass ; } // Pass the child as pointer in case it is an array $ node = & $ node [ $ nodes [ $ i ] ] ; } } if ( ! \ is_array ( $ node ) ) { // Convert the node to array to make append possible $ node = get_object_vars ( $ node ) ; } $ node [ ] = $ value ; $ result = $ value ; } return $ result ; }
Append value to a path in registry

@param   string  $path   Parent registry Path (e.g. joomla.content.showauthor)
@param   mixed   $value  Value of entry

@return  mixed  The value of the that has been set.

@since   1.4.0
Append value to a path in registry