class Bracket implements Stringable

Bracket type is for processing from database bracket field.

Methods

string|int
left()

Get the first element of the array.

string|int
right()

Get the second element of the array.

string|int
to(string|null $default = null)

Get a value or default value.

string|int
escape()

Get an escaped value.

string
array()

Get an array of values.

string
__toString()

Class magic method to get the instance information for a Exception

static Bracket
of(string|null $value)

Create a instance.

Details

at line 49
string|int left()

Get the first element of the array.

Return Value

string|int

This method returns the first element of the array.

at line 63
string|int right()

Get the second element of the array.

Return Value

string|int

This method returns the second element of the array.

at line 78
string|int to(string|null $default = null)

Get a value or default value.

Parameters

string|null $default

Default value.

Return Value

string|int

The method returns the value or default value.

at line 96
string|int escape()

Get an escaped value.

Return Value

string|int

The method returns the escaped value.

at line 114
string array()

Get an array of values.

Return Value

string

This method returns an array of values.

at line 124
string __toString()

Class magic method to get the instance information for a Exception

Return Value

string

The method returns the instance information for a Exception

at line 139
static Bracket of(string|null $value)

Create a instance.

Parameters

string|null $value

Return Value

Bracket

The method returns the new instance.

Examples

echo Bracket::of('int unsigned')
echo Bracket::of('int unsigned')->left
echo Bracket::of('int unsigned')->right