protected function 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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!DependencyInjection!Dumper!OptimizedPhpArrayDumper.php/function/OptimizedPhpArrayDumper::dumpCallable/8.1.x