Class Helper_Array_Insert

Overview

Helper class to recursively merges arrays.

If one of the Arguments isn't an Array, first Argument is returned. If an Element is an Array in both Arrays, Arrays are merged recursively, otherwise the element in $ins will overwrite the element in $arr (regardless if key is numeric or not). This also applies to Arrays in $arr, if the Element is scalar in $ins (in difference to the previous approach).

author: Walter Torres <walter@torres.ws>
version: $Revision: 1.0 $
usedby: Bluewater_Config::__construct()
example: example not found

Located in /helper/array_insert.php (line 62)


	
    		        
Method Summary
void __construct (void 0)
array helper ([ $_args = array()])
array _array_insert ([ $arr = array()], [ $ins = array()])
Methods
Constructor __construct (line 83)

Each Helper class has to have an empty __construct method

final:
access: public
void __construct (void 0)
  • void 0
helper (line 103)

Recursively merges arrays

Setup inbound parameters for actual method call.

Method arguments are actually sent within an indexed array.

return: Merges arrays
access: public
uses: Helper_Array_Insert::_array_insert()
array helper ([ $_args = array()])
  • array $_args: Method arguments are sent within an indexed array
_array_insert (line 134)

Recursively merges arrays

This method does the actual work.

return: Merges arrays
author: thomas@thoftware.de
link: http://us2.php.net/manual/en/function.array-merge-recursive.php#82976
access: private
usedby: Helper_Array_Insert::_array_insert()
uses: Helper_Array_Insert::_array_insert()
usedby: Helper_Array_Insert::helper()
array _array_insert ([ $arr = array()], [ $ins = array()])
  • array $arr: Array to merge into
  • array $ins: Array to merge from

Documentation generated on Tue, 18 Aug 2009 02:30:11 -0500 by phpDocumentor 1.4.2