class Casing extends StringMutator (View source)

Converts string between different casing types.

Based on jawira/case-converter.

Traits

Properties

protected $casing from  TakesOnlyStringCasing

Methods

__construct(StringCase|string $casing)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
ada()

Use the Ada casing.

camel()

Use the Camel casing.

cobol()

Use the Cobol casing.

dot()

Use the Dot casing.

kebab()

Use the Kebab casing.

lower()

Use the Lower casing.

macro()

Use the Macro casing.

make(StringCase|string $casing)

No description

mixed
mutate(mixed $value)

Mutate the input value.

string
mutateString(string $value)

No description

pascal()

Use the Pascal casing.

string
resolveStringInput(mixed $value)

No description

sentence()

Use the Sentence casing.

snake()

Use the Snake casing.

title()

Use the Title casing.

train()

Use the Train casing.

upper()

Use the Upper casing.

Details

__construct(StringCase|string $casing)

No description

Parameters

StringCase|string $casing

The casing to use

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static TakesOnlyStringCasing ada()

Use the Ada casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing camel()

Use the Camel casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing cobol()

Use the Cobol casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing dot()

Use the Dot casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing kebab()

Use the Kebab casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing lower()

Use the Lower casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing macro()

Use the Macro casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing make(StringCase|string $casing)

No description

Parameters

StringCase|string $casing

The casing to use

Return Value

TakesOnlyStringCasing

final mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected string mutateString(string $value)

No description

Parameters

string $value

Return Value

string

static TakesOnlyStringCasing pascal()

Use the Pascal casing.

Return Value

TakesOnlyStringCasing

protected string resolveStringInput(mixed $value)

No description

Parameters

mixed $value

Return Value

string

static TakesOnlyStringCasing sentence()

Use the Sentence casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing snake()

Use the Snake casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing title()

Use the Title casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing train()

Use the Train casing.

Return Value

TakesOnlyStringCasing

static TakesOnlyStringCasing upper()

Use the Upper casing.

Return Value

TakesOnlyStringCasing