\EasyWeChat\SupportStr

Summary

Methods
Properties
Constants
camel()
random()
randomBytes()
quickRandom()
upper()
title()
snake()
studly()
No public properties found
No constants found
No protected methods found
$snakeCache
$camelCache
$studlyCache
N/A
No private methods found
No private properties found
N/A

Properties

$snakeCache

$snakeCache : array

The cache of snake-cased words.

Type

array

$camelCache

$camelCache : array

The cache of camel-cased words.

Type

array

$studlyCache

$studlyCache : array

The cache of studly-cased words.

Type

array

Methods

camel()

camel(string  $value) : string

Convert a value to camel case.

Parameters

string $value

Returns

string

random()

random(integer  $length = 16) : string

Generate a more truly "random" alpha-numeric string.

Parameters

integer $length

Throws

\RuntimeException

Returns

string

randomBytes()

randomBytes(integer  $length = 16) : string

Generate a more truly "random" bytes.

Parameters

integer $length

Throws

\EasyWeChat\Core\Exceptions\RuntimeException

Returns

string

quickRandom()

quickRandom(integer  $length = 16) : string

Generate a "random" alpha-numeric string.

Should not be considered sufficient for cryptography, etc.

Parameters

integer $length

Returns

string

upper()

upper(string  $value) : string

Convert the given string to upper-case.

Parameters

string $value

Returns

string

title()

title(string  $value) : string

Convert the given string to title case.

Parameters

string $value

Returns

string

snake()

snake(string  $value, string  $delimiter = '_') : string

Convert a string to snake case.

Parameters

string $value
string $delimiter

Returns

string

studly()

studly(string  $value) : string

Convert a value to studly caps case.

Parameters

string $value

Returns

string