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 155
static string format(string $statement, ...$args)

Generates PHP statement.

Parameters

string $statement
...$args

Return Value

string

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

Generates PHP statement.

Parameters

string $statement
array $args

Return Value

string

at line 204
static string formatMember($name)

Returns a PHP representation of a object member.

Parameters

$name

Return Value

string

at line 212
static string formatDocComment(string $content)

No description

Parameters

string $content

Return Value

string

at line 224
static string unformatDocComment(string $comment)

No description

Parameters

string $comment

Return Value

string

at line 230
static bool isIdentifier($value)

No description

Parameters

$value

Return Value

bool

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

No description

Parameters

$value
bool $allowLeadingSlash

Return Value

bool

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

internal  
 

No description

Parameters

string $class
array $props

Return Value

object

at line 253
static string extractNamespace(string $name)

No description

Parameters

string $name

Return Value

string

at line 259
static string extractShortName(string $name)

No description

Parameters

string $name

Return Value

string

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

No description

Parameters

string $s
int $count

Return Value

string

Traits

StaticClass