protected static function Formatter::isIterable in RESTful 7.2
Helper function to know if a variable is iterable or not.
Parameters
mixed $input: The variable to test.
Return value
bool TRUE if the variable is iterable.
4 calls to Formatter::isIterable()
- FormatterHalJson::extractFieldValues in src/
Plugin/ formatter/ FormatterHalJson.php - Extracts the actual values from the resource fields.
- FormatterJson::extractFieldValues in src/
Plugin/ formatter/ FormatterJson.php - Extracts the actual values from the resource fields.
- FormatterJsonApi::embedField in src/
Plugin/ formatter/ FormatterJsonApi.php - Embeds the final contents of a field.
- FormatterJsonApi::extractFieldValues in src/
Plugin/ formatter/ FormatterJsonApi.php - Extracts the actual values from the resource fields.
File
- src/
Plugin/ formatter/ Formatter.php, line 101 - Contains \Drupal\restful\Plugin\formatter\Formatter
Class
- Formatter
- Class Formatter.
Namespace
Drupal\restful\Plugin\formatterCode
protected static function isIterable($input) {
return is_array($input) || $input instanceof \Traversable || $input instanceof \stdClass;
}