You are here

function nusoap_base::isArraySimpleOrStruct in Salesforce Suite 5.2

Same name in this branch
  1. 5.2 includes/nusoap.php \nusoap_base::isArraySimpleOrStruct()
  2. 5.2 includes/nusoap.orig.php \nusoap_base::isArraySimpleOrStruct()
Same name and namespace in other branches
  1. 5 includes/nusoap.php \nusoap_base::isArraySimpleOrStruct()
  2. 5 includes/nusoap.orig.php \nusoap_base::isArraySimpleOrStruct()

* detect if array is a simple array or a struct (associative array) * *

Parameters

mixed $val The PHP array: * @return string (arraySimple|arrayStruct) * @access private

2 calls to nusoap_base::isArraySimpleOrStruct()
nusoap_base::serialize_val in includes/nusoap.php
* serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @access public
nusoap_base::serialize_val in includes/nusoap.orig.php
* serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @access public

File

includes/nusoap.orig.php, line 359

Class

nusoap_base
nusoap_base

Code

function isArraySimpleOrStruct($val) {
  $keyList = array_keys($val);
  foreach ($keyList as $keyListValue) {
    if (!is_int($keyListValue)) {
      return 'arrayStruct';
    }
  }
  return 'arraySimple';
}