Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Cache
  • Locale
  • Utils
  • Overview
  • Namespace
  • Class
  • Tree

Class Utils

Utils

Namespace: Xoops
Package: Xoops
Category: Xoops\Utils
Copyright: 2011-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: trabis lusopoemas@gmail.com
Link: http://xoops.org
Located at oops_lib/Xoops/Utils.php
Methods summary
public static string
# dumpVar( mixed $var, boolean $echo = true )

Output a dump of a variable

Output a dump of a variable

Parameters

$var
variable to dump
$echo
true to echo dump, false to return dump as string

Returns

string
public static string
# dumpFile( mixed $file, boolean $echo = true )

Output a dump of a file

Output a dump of a file

Parameters

$file
file to dump
$echo
true to echo dump, false to return dump as string

Returns

string
public static array
# arrayRecursiveDiff( array $aArray1, array $aArray2 )

Support for recursive array_diff

Support for recursive array_diff

Compares first array against the second and returns the difference - that is the values in the first, but not in the second array

Parameters

$aArray1
first array
$aArray2
second array

Returns

array
public static array
# arrayRecursiveMerge( array $data, mixed $merge )

This function can be thought of as a hybrid between PHP's array_merge and array_merge_recursive. The difference between this method and the built-in ones, is that if an array key contains another array, then Utils::arrayRecursiveMerge() will behave in a recursive fashion (unlike array_merge). But it will not act recursively for keys that contain scalar values (unlike array_merge_recursive).

This function can be thought of as a hybrid between PHP's array_merge and array_merge_recursive. The difference between this method and the built-in ones, is that if an array key contains another array, then Utils::arrayRecursiveMerge() will behave in a recursive fashion (unlike array_merge). But it will not act recursively for keys that contain scalar values (unlike array_merge_recursive).

Note: This function will work with an unlimited amount of arguments and typecasts non-array parameters into arrays.

Parameters

$data
Array to be merged
$merge
Array to merge with. The argument and all trailing arguments will be array cast when merged

Returns

array
Merged array

Link

http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::merge
API documentation generated by ApiGen