class ViewStringType extends StringType

The custom 'view-string' type class. It's a subset of the string type. Every string that passes the view()->exists($string) test is a valid view-string type.

Methods

string
describe(VerbosityLevel $level)

Describe the type.

AcceptsResult
accepts(Type $type, bool $strictTypes)

Determine whether the type accepts the given type.

IsSuperTypeOfResult
isSuperTypeOf(Type $type)

Determine whether the type is a supertype of the given type.

static bool
occursIn(Type $type)

Determine whether a view-string type occurs in the type, such as in a union or a callable signature.

static Type
__set_state(array $properties)

Restore the type from its exported state.

Details

at line 28
string describe(VerbosityLevel $level)

Describe the type.

Parameters

VerbosityLevel $level

Return Value

string

at line 36
AcceptsResult accepts(Type $type, bool $strictTypes)

Determine whether the type accepts the given type.

Parameters

Type $type
bool $strictTypes

Return Value

AcceptsResult

at line 65
IsSuperTypeOfResult isSuperTypeOf(Type $type)

Determine whether the type is a supertype of the given type.

Parameters

Type $type

Return Value

IsSuperTypeOfResult

at line 94
static bool occursIn(Type $type)

Determine whether a view-string type occurs in the type, such as in a union or a callable signature.

Parameters

Type $type

Return Value

bool

at line 114
static Type __set_state(array $properties)

Restore the type from its exported state.

Parameters

array $properties

Return Value

Type