mediatekformation

TypeGenerator
in package
implements GeneratorInterface

Interfaces, Classes, Traits and Enums

GeneratorInterface

Table of Contents

$internalPhpTypes  : array<string|int, string>
$isInternalPhpType  : bool
$nullable  : bool
$type  : string
$validIdentifierMatcher  : string
__toString()  : string
fromTypeString()  : TypeGenerator
generate()  : mixed
__construct()  : mixed
isInternalPhpType()  : bool
trimNullable()  : array<string|int, bool>|array<string|int, string>
trimType()  : array<string|int, bool>|array<string|int, string>

Properties

$validIdentifierMatcher

private static string $validIdentifierMatcher = '/^[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*' . '(\\\\[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*)*$/'

a regex pattern to match valid class names or types

Methods

__toString()

public __toString() : string
Return values
string

the cleaned type string

generate()

public generate() : mixed
Return values
mixed

__construct()

private __construct() : mixed
Return values
mixed

isInternalPhpType()

private static isInternalPhpType(string $type) : bool
Parameters
$type : string
Return values
bool

trimNullable()

private static trimNullable(string $type) : array<string|int, bool>|array<string|int, string>
Parameters
$type : string
Return values
array<string|int, bool>|array<string|int, string>

ordered tuple, first key represents whether the type is nullable, second is the trimmed string

trimType()

private static trimType(string $type) : array<string|int, bool>|array<string|int, string>
Parameters
$type : string
Return values
array<string|int, bool>|array<string|int, string>

ordered tuple, first key represents whether the values was trimmed, second is the trimmed string

Search results