You are here

final public static function RestfulBase::isArrayNumeric in RESTful 7

Helper method to determine if an array is numeric.

Parameters

array $input: The input array.

Return value

boolean TRUE if the array is numeric, false otherwise.

3 calls to RestfulBase::isArrayNumeric()
RestfulEntityBase::getImageUris in plugins/restful/RestfulEntityBase.php
Get the image URLs based on the configured image styles.
RestfulExampleArticlesResource__1_5::imageProcess in modules/restful_example/plugins/restful/node/articles/1.5/RestfulExampleArticlesResource__1_5.class.php
Process callback, Remove Drupal specific items from the image array.
RestfulFormatterHalJson::moveReferencesToEmbeds in plugins/formatter/hal_json/RestfulFormatterHalJson.class.php
Move the fields referencing other resources to the _embed key.

File

plugins/restful/RestfulBase.php, line 1752
Contains RestfulBase.

Class

RestfulBase
Class \RestfulBase

Code

public static final function isArrayNumeric(array $input) {
  foreach (array_keys($input) as $key) {
    if (!ctype_digit((string) $key)) {
      return FALSE;
    }
  }
  return TRUE;
}