class Helpers

PHP code generator utils.

Constants

PHP_IDENT

WRAP_LENGTH

INDENT_LENGTH

MAX_DEPTH

Methods

static string
dump($var)

Returns a PHP representation of a variable.

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

Generates PHP statement.

static string
formatArgs($statement, array $args)

Generates PHP statement.

static string
formatMember($name)

Returns a PHP representation of a object member.

static string
formatDocComment($content)

No description

static string
unformatDocComment($comment)

No description

static bool
isIdentifier($value)

No description

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

No description

static object
createObject($class, array $props)

No description

static string
extractNamespace($name)

No description

static string
extractShortName($name)

No description

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

No description

Details

at line 33
static string dump($var)

Returns a PHP representation of a variable.

Parameters

$var

Return Value

string

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

Generates PHP statement.

Parameters

$statement
...$args

Return Value

string

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

Generates PHP statement.

Parameters

$statement
array $args

Return Value

string

at line 209
static string formatMember($name)

Returns a PHP representation of a object member.

Parameters

$name

Return Value

string

at line 221
static string formatDocComment($content)

No description

Parameters

$content

Return Value

string

at line 237
static string unformatDocComment($comment)

No description

Parameters

$comment

Return Value

string

at line 246
static bool isIdentifier($value)

No description

Parameters

$value

Return Value

bool

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

No description

Parameters

$value
$allowLeadingSlash

Return Value

bool

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

internal  
 

No description

Parameters

$class
array $props

Return Value

object

at line 277
static string extractNamespace($name)

No description

Parameters

$name

Return Value

string

at line 287
static string extractShortName($name)

No description

Parameters

$name

Return Value

string

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

No description

Parameters

$s
$count

Return Value

string

Traits

StaticClass