final class Helpers

PHP code generator utils.

Constants

PHP_IDENT

WRAP_LENGTH

INDENT_LENGTH

private MAX_DEPTH

Methods

static string
dump($var)

Returns a PHP representation of a variable.

static string
format(string $statement, ...$args)

Generates PHP statement.

static string
formatArgs(string $statement, array $args)

Generates PHP statement.

static string
formatMember($name)

Returns a PHP representation of a object member.

static string
formatDocComment(string $content)

No description

static string
unformatDocComment(string $comment)

No description

static bool
isIdentifier($value)

No description

static bool
isNamespaceIdentifier($value, bool $allowLeadingSlash = false)

No description

static object
createObject(string $class, array $props)

No description

static string
extractNamespace(string $name)

No description

static string
extractShortName(string $name)

No description

static string
tabsToSpaces(string $s, int $count = self::INDENT_LENGTH)

No description

Details

at line 34
static string dump($var)

Returns a PHP representation of a variable.

Parameters

$var

Return Value

string

at line 159
static string format(string $statement, ...$args)

Generates PHP statement.

Parameters

string $statement
...$args

Return Value

string

at line 168
static string formatArgs(string $statement, array $args)

Generates PHP statement.

Parameters

string $statement
array $args

Return Value

string

at line 208
static string formatMember($name)

Returns a PHP representation of a object member.

Parameters

$name

Return Value

string

at line 216
static string formatDocComment(string $content)

No description

Parameters

string $content

Return Value

string

at line 228
static string unformatDocComment(string $comment)

No description

Parameters

string $comment

Return Value

string

at line 234
static bool isIdentifier($value)

No description

Parameters

$value

Return Value

bool

at line 240
static bool isNamespaceIdentifier($value, bool $allowLeadingSlash = false)

No description

Parameters

$value
bool $allowLeadingSlash

Return Value

bool

at line 251
static object createObject(string $class, array $props)

internal  
 

No description

Parameters

string $class
array $props

Return Value

object

at line 257
static string extractNamespace(string $name)

No description

Parameters

string $name

Return Value

string

at line 263
static string extractShortName(string $name)

No description

Parameters

string $name

Return Value

string

at line 269
static string tabsToSpaces(string $s, int $count = self::INDENT_LENGTH)

No description

Parameters

string $s
int $count

Return Value

string

Traits

StaticClass