english/libraries/joomla/utilities/arrayhelper.php
/**
	 * Utility function to map an array to a stdClass object.
	 *
	 * @param   array    $array		The array to map.
	 * @param   string   $class		Name of the class to create
	 *
	 * @return  object   The object mapped from the given array
	 * @since   11.1
	 */
Utility function to map an array to a stdClass object.

@return  object   The object mapped from the given array
@since   11.1
Utility function to map an array to a stdClass object . @return object The object mapped from the given array @since 11 . 1
public static function toObject(&$array, $class = 'stdClass')
	{
		$obj = null;
		if (is_array($array)) {
			$obj = new $class;
			foreach ($array as $k => $v) {
				if (is_array($v)) {
					$obj->$k = JArrayHelper::toObject($v, $class);
				} else {
					$obj->$k = $v;
				}
			}
		}
		return $obj;
	}
public static function toObject ( & $ array , $ class = 'stdClass' ) { $ obj = null ; if ( is_array ( $ array ) ) { $ obj = new $ class ; foreach ( $ array as $ k => $ v ) { if ( is_array ( $ v ) ) { $ obj -> $ k = JArrayHelper :: toObject ( $ v , $ class ) ; } else { $ obj -> $ k = $ v ; } } } return $ obj ; }
Utility function to map an array to a stdClass object.
Utility function to map an array to a stdClass object .