OptimizedPhpArrayDumper::dumpCallable

protected OptimizedPhpArrayDumper::dumpCallable($callable)

Dumps callable to a PHP array.

Parameters

array|callable $callable: The callable to process.

Return value

callable The processed callable.

File

core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php, line 350

Class

OptimizedPhpArrayDumper
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array.

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected function dumpCallable($callable) {
  if (is_array($callable)) {
    $callable[0] = $this->dumpValue($callable[0]);
    $callable = array($callable[0], $callable[1]);
  }

  return $callable;
}
doc_Drupal
2016-10-29 09:32:35
Comments
Leave a Comment

Please login to continue.