You are here

function advagg_get_serializer in Advanced CSS/JS Aggregation 8.2

Get the serialization function.

Return value

string The serializer. Defaults to json_encode.

2 calls to advagg_get_serializer()
advagg_get_current_hooks_hash in ./advagg.module
Get the hash of all hooks and settings that affect aggregated files contents.
advagg_hooks_implemented in ./advagg.module
Get back what hooks are implemented.

File

./advagg.module, line 432
Advanced CSS/JS aggregation module.

Code

function advagg_get_serializer() {
  $serialize_function = \Drupal::config('advagg.settings')
    ->get('serializer');
  if (!is_string($serialize_function) || !is_callable($serialize_function)) {
    $serialize_function = 'json_encode';
  }
  return $serialize_function;
}