class Split extends Mutator (View source)

Splits a string into an array of strings with a specified max size.

Traits

Properties

protected $encoding from  UsesEncoding

Methods

__construct(int $size, string $encoding = null)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
string|null
getEncoding(string $input = null)

No description

static Split
make(int $size, string $encoding = null)

No description

mixed
mutate(mixed $value)

Mutate the input value.

void
setEncoding(string|null $encoding)

No description

void
validateEncoding(string|null $encoding)

No description

Details

__construct(int $size, string $encoding = null)

No description

Parameters

int $size

The size of each chunk.

string $encoding

The encoding to use (optional).

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected string|null getEncoding(string $input = null)

No description

Parameters

string $input

Return Value

string|null

static Split make(int $size, string $encoding = null)

No description

Parameters

int $size

The size of each chunk.

string $encoding

The encoding to use (optional).

Return Value

Split

mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected void setEncoding(string|null $encoding)

No description

Parameters

string|null $encoding

Return Value

void

protected void validateEncoding(string|null $encoding)

No description

Parameters

string|null $encoding

Return Value

void