class Variable (View source)

Provides helpers for dealing with variables.

Methods

static string
callableToString(callable $callable)

Generates a human-readable name for a callable.

static string
export(mixed $var, string $prefix = '')

Drupal-friendly var_export().

Details

static string callableToString(callable $callable)

Generates a human-readable name for a callable.

Parameters

callable $callable

A callable.

Return Value

string

A human-readable name for the callable.

static string export(mixed $var, string $prefix = '')

Drupal-friendly var_export().

Parameters

mixed $var

The variable to export.

string $prefix

A prefix that will be added at the beginning of every lines of the output.

Return Value

string

The variable exported in a way compatible to Drupal's coding standards.