UnresolvedReference implements Reference uses ScalarFunctionChain
Interfaces
Methods
- __construct() : mixed
- __toString() : string
- and() : All
- andNot() : All
- append() : Append
- arrayFilter() : ArrayFilter
- Filters an array by removing all elements that matches passed value.
- arrayGet() : ArrayGet
- arrayGetCollection() : ArrayGetCollection
- arrayGetCollectionFirst() : ArrayGetCollection
- arrayKeep() : ArrayKeep
- Filters an array by keeping only elements that matches passed value.
- arrayKeys() : ArrayKeys
- Returns all keys from an array, ignoring the values.
- arrayMerge() : ArrayMerge
- arrayMergeCollection() : ArrayMergeCollection
- arrayPathExists() : ArrayPathExists
- arrayReverse() : ArrayReverse
- arraySort() : ArraySort
- arrayValues() : ArrayValues
- Returns all values from an array, ignoring the keys.
- as() : self
- asc() : self
- ascii() : Ascii
- base() : string
- between() : Between
- binaryLength() : BinaryLength
- call() : CallUserFunc
- capitalize() : Capitalize
- cast() : Cast
- children() : array<int, ScalarFunction>
- Every operand of this node that is an expression, in constructor order.
- chunk() : Chunk
- coalesce() : Coalesce
- codePointLength() : CodePointLength
- collapseWhitespace() : CollapseWhitespace
- concat() : Concat
- concatWithSeparator() : ConcatWithSeparator
- contains() : Contains
- dateFormat() : DateTimeFormat
- dateTimeFormat() : DateTimeFormat
- desc() : self
- divide() : Divide
- domElementAttributesCount() : DOMElementAttributesCount
- domElementAttributeValue() : DOMElementAttributeValue
- domElementNamespace() : DOMElementNamespaceValue
- domElementNextSibling() : DOMElementNextSibling
- domElementParent() : DOMElementParent
- domElementPreviousSibling() : DOMElementPreviousSibling
- domElementValue() : DOMElementValue
- endsWith() : EndsWith
- ensureEnd() : EnsureEnd
- ensureStart() : EnsureStart
- enumName() : EnumName
- enumValue() : EnumValue
- equals() : Equals
- eval() : mixed
- exists() : Exists
- expand() : ArrayExpand
- Expands each value into entry, if there are more than one value, multiple rows will be created.
- greaterThan() : GreaterThan
- greaterThanEqual() : GreaterThanEqual
- hasAlias() : bool
- hash() : Hash
- htmlQuerySelector() : HTMLQuerySelector
- htmlQuerySelectorAll() : HTMLQuerySelectorAll
- indexOf() : IndexOf
- Returns the index of given $needle in string.
- indexOfLast() : IndexOfLast
- Returns the last index of given $needle in string.
- init() : Reference
- is() : bool
- isEmpty() : IsEmpty
- isEven() : Equals
- isFalse() : Same
- isIn() : IsIn
- isNotNull() : IsNotNull
- isNotNumeric() : IsNotNumeric
- isNull() : IsNull
- isNumeric() : IsNumeric
- isOdd() : NotEquals
- isTrue() : Same
- isType() : IsType
- isUtf8() : IsUtf8
- Check string is utf8 and returns true or false.
- jsonDecode() : JsonDecode
- jsonEncode() : JsonEncode
- lessThan() : LessThan
- lessThanEqual() : LessThanEqual
- list() : ListFunctions
- literal() : Literal
- lower() : ToLower
- minus() : Minus
- mod() : Mod
- modifyDateTime() : ModifyDateTime
- multiply() : Multiply
- name() : string
- notEquals() : NotEquals
- notSame() : NotSame
- numberFormat() : NumberFormat
- onEach() : OnEach
- Execute a scalar function on each element of an array/list/map/structure entry.
- or() : Any
- orNot() : Any
- plus() : Plus
- power() : Power
- prepend() : Prepend
- regex() : Regex
- regexAll() : RegexAll
- regexMatch() : RegexMatch
- regexMatchAll() : RegexMatchAll
- regexReplace() : RegexReplace
- repeat() : Repeat
- resolve() : ResolvedReference
- Kept on the leaf rather than inlined in the resolver so $alias/$sort copying stays in the class that owns those fields - the resolver never learns the leaf's internal shape.
- resolved() : bool
- True when this node and every node in children() can answer returns().
- returns() : Type<string|int, mixed>
- The type of the column this function produces, before any row is read.
- reverse() : Reverse
- round() : Round
- same() : Same
- sanitize() : Sanitize
- size() : Size
- slug() : Slug
- sort() : SortOrder
- split() : Split
- sprintf() : Sprintf
- startsWith() : StartsWith
- stringAfter() : StringAfter
- Returns the contents found after the first occurrence of the given string.
- stringAfterLast() : StringAfterLast
- Returns the contents found after the last occurrence of the given string.
- stringBefore() : StringBefore
- Returns the contents found before the first occurrence of the given string.
- stringBeforeLast() : StringBeforeLast
- Returns the contents found before the last occurrence of the given string.
- stringContainsAny() : StringContainsAny
- stringEqualsTo() : StringEqualsTo
- stringFold() : StringFold
- Returns a string that you can use in case-insensitive comparisons.
- stringMatch() : StringMatch
- stringMatchAll() : StringMatchAll
- stringNormalize() : StringNormalize
- stringStyle() : StringStyle
- Covert string to a style from enum list, passed in parameter.
- stringTitle() : StringTitle
- Changes all graphemes/code points to "title case".
- stringWidth() : StringWidth
- strPad() : StrPad
- strPadBoth() : StrPad
- strPadLeft() : StrPad
- strPadRight() : StrPad
- strReplace() : StrReplace
- structure() : StructureFunctions
- to() : string
- toDate() : ToDate
- toDateTime() : ToDateTime
- trim() : Trim
- truncate() : Truncate
- unicodeLength() : UnicodeLength
- unpack() : ArrayUnpack
- Unpacks each element of an array into a new entry, using the array key as the entry name.
- upper() : ToUpper
- withChildren() : static
- A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
- wordwrap() : Wordwrap
- xpath() : XPath
Methods
__construct()
public
__construct(string $entry[, string|null $alias = null ][, SortOrder $sort = SortOrder::ASC ]) : mixed
Parameters
- $entry : string
- $alias : string|null = null
- $sort : SortOrder = SortOrder::ASC
__toString()
public
__toString() : string
Return values
stringand()
public
and(ScalarFunction $function) : All
Parameters
- $function : ScalarFunction
Return values
AllandNot()
public
andNot(ScalarFunction $function) : All
Parameters
- $function : ScalarFunction
Return values
Allappend()
public
append(ScalarFunction|string $suffix) : Append
Parameters
- $suffix : ScalarFunction|string
Return values
AppendarrayFilter()
Filters an array by removing all elements that matches passed value.
public
arrayFilter(mixed $value) : ArrayFilter
Applicable to all data structures that can be converted to an array:
- json
- list
- map
- structure.
Parameters
- $value : mixed
Return values
ArrayFilterarrayGet()
public
arrayGet(string $path) : ArrayGet
Parameters
- $path : string
Return values
ArrayGetarrayGetCollection()
public
arrayGetCollection(ScalarFunction|array<string|int, mixed> $keys) : ArrayGetCollection
Parameters
- $keys : ScalarFunction|array<string|int, mixed>
Return values
ArrayGetCollectionarrayGetCollectionFirst()
public
arrayGetCollectionFirst(string ...$keys) : ArrayGetCollection
Parameters
- $keys : string
Return values
ArrayGetCollectionarrayKeep()
Filters an array by keeping only elements that matches passed value.
public
arrayKeep(mixed $value) : ArrayKeep
Applicable to all data structures that can be converted to an array:
- json
- list
- map
- structure.
Parameters
- $value : mixed
Return values
ArrayKeeparrayKeys()
Returns all keys from an array, ignoring the values.
public
arrayKeys() : ArrayKeys
Applicable to all data structures that can be converted to an array:
- json
- list
- map
- structure.
Return values
ArrayKeysarrayMerge()
public
arrayMerge(ScalarFunction|array<string|int, mixed> $ref) : ArrayMerge
Parameters
- $ref : ScalarFunction|array<string|int, mixed>
Return values
ArrayMergearrayMergeCollection()
public
arrayMergeCollection() : ArrayMergeCollection
Return values
ArrayMergeCollectionarrayPathExists()
public
arrayPathExists(ScalarFunction|string $path) : ArrayPathExists
Parameters
- $path : ScalarFunction|string
Return values
ArrayPathExistsarrayReverse()
public
arrayReverse([bool $preserveKeys = false ]) : ArrayReverse
Parameters
- $preserveKeys : bool = false
Return values
ArrayReversearraySort()
public
arraySort([Sort|null $sortFunction = null ][, ScalarFunction|int|null $flags = null ][, ScalarFunction|bool $recursive = true ]) : ArraySort
Parameters
- $sortFunction : Sort|null = null
- $flags : ScalarFunction|int|null = null
- $recursive : ScalarFunction|bool = true
Return values
ArraySortarrayValues()
Returns all values from an array, ignoring the keys.
public
arrayValues() : ArrayValues
Applicable to all data structures that can be converted to an array:
- json
- list
- map
- structure.
Return values
ArrayValuesas()
public
as(string $alias) : self
Parameters
- $alias : string
Return values
selfasc()
public
asc() : self
Return values
selfascii()
public
ascii() : Ascii
Return values
Asciibase()
public
base() : string
Return values
stringbetween()
public
between(mixed|ScalarFunction $lowerBoundRef, mixed|ScalarFunction $upperBoundRef[, Boundary|ScalarFunction $boundary = Boundary::LEFT_INCLUSIVE ]) : Between
Parameters
- $lowerBoundRef : mixed|ScalarFunction
- $upperBoundRef : mixed|ScalarFunction
- $boundary : Boundary|ScalarFunction = Boundary::LEFT_INCLUSIVE
Return values
BetweenbinaryLength()
public
binaryLength() : BinaryLength
Return values
BinaryLengthcall()
public
call(ScalarFunction $callable, Type<string|int, mixed> $returnType[, array<string|int, mixed> $arguments = [] ][, string|int $refAlias = 0 ]) : CallUserFunc
Parameters
- $callable : ScalarFunction
- $returnType : Type<string|int, mixed>
- $arguments : array<string|int, mixed> = []
- $refAlias : string|int = 0
Return values
CallUserFunccapitalize()
public
capitalize() : Capitalize
Return values
Capitalizecast()
public
cast(string|Type<string|int, mixed> $type) : Cast
Parameters
- $type : string|Type<string|int, mixed>
Return values
Castchildren()
Every operand of this node that is an expression, in constructor order.
public
children() : array<int, ScalarFunction>
Return values
array<int, ScalarFunction>chunk()
public
chunk(ScalarFunction|int $size) : Chunk
Parameters
- $size : ScalarFunction|int
Return values
Chunkcoalesce()
public
coalesce(ScalarFunction ...$params) : Coalesce
Parameters
- $params : ScalarFunction
Return values
CoalescecodePointLength()
public
codePointLength() : CodePointLength
Return values
CodePointLengthcollapseWhitespace()
public
collapseWhitespace() : CollapseWhitespace
Return values
CollapseWhitespaceconcat()
public
concat(ScalarFunction|string ...$params) : Concat
Parameters
- $params : ScalarFunction|string
Return values
ConcatconcatWithSeparator()
public
concatWithSeparator(ScalarFunction|string $separator, ScalarFunction|string ...$params) : ConcatWithSeparator
Parameters
- $separator : ScalarFunction|string
- $params : ScalarFunction|string
Return values
ConcatWithSeparatorcontains()
public
contains(ScalarFunction|string $needle) : Contains
Parameters
- $needle : ScalarFunction|string
Return values
ContainsdateFormat()
public
dateFormat([string $format = 'Y-m-d' ]) : DateTimeFormat
Parameters
- $format : string = 'Y-m-d'
Return values
DateTimeFormatdateTimeFormat()
public
dateTimeFormat([string $format = 'Y-m-d H:i:s' ]) : DateTimeFormat
Parameters
- $format : string = 'Y-m-d H:i:s'
Return values
DateTimeFormatdesc()
public
desc() : self
Return values
selfdivide()
public
divide(ScalarFunction|int|float|string $value[, ScalarFunction|int|null $scale = null ][, ScalarFunction|Rounding|null $rounding = null ]) : Divide
Parameters
- $value : ScalarFunction|int|float|string
- $scale : ScalarFunction|int|null = null
- $rounding : ScalarFunction|Rounding|null = null
Return values
DividedomElementAttributesCount()
public
domElementAttributesCount() : DOMElementAttributesCount
Return values
DOMElementAttributesCountdomElementAttributeValue()
public
domElementAttributeValue(ScalarFunction|string $attribute) : DOMElementAttributeValue
Parameters
- $attribute : ScalarFunction|string
Return values
DOMElementAttributeValuedomElementNamespace()
public
domElementNamespace([ScalarFunction|string|null $attribute = null ]) : DOMElementNamespaceValue
Parameters
- $attribute : ScalarFunction|string|null = null
Return values
DOMElementNamespaceValuedomElementNextSibling()
public
domElementNextSibling() : DOMElementNextSibling
Return values
DOMElementNextSiblingdomElementParent()
public
domElementParent() : DOMElementParent
Return values
DOMElementParentdomElementPreviousSibling()
public
domElementPreviousSibling() : DOMElementPreviousSibling
Return values
DOMElementPreviousSiblingdomElementValue()
public
domElementValue() : DOMElementValue
Return values
DOMElementValueendsWith()
public
endsWith(ScalarFunction|string $needle) : EndsWith
Parameters
- $needle : ScalarFunction|string
Return values
EndsWithensureEnd()
public
ensureEnd(ScalarFunction|string $suffix) : EnsureEnd
Parameters
- $suffix : ScalarFunction|string
Return values
EnsureEndensureStart()
public
ensureStart(ScalarFunction|string $prefix) : EnsureStart
Parameters
- $prefix : ScalarFunction|string
Return values
EnsureStartenumName()
public
enumName() : EnumName
Return values
EnumNameenumValue()
public
enumValue() : EnumValue
Return values
EnumValueequals()
public
equals(mixed $ref) : Equals
Parameters
- $ref : mixed
Return values
Equalseval()
public
eval(Row $row, FlowContext $context) : mixed
Parameters
- $row : Row
- $context : FlowContext
exists()
public
exists() : Exists
Return values
Existsexpand()
Expands each value into entry, if there are more than one value, multiple rows will be created.
public
expand([ArrayExpand $expand = ArrayExpand::VALUES ]) : ArrayExpand
Array keys are ignored, only values are used to create new rows. Nested in another function (structure(), concat(), ...) it still gives one row per element. Several expands in one expression are zipped to the longest list; a shorter one gives null, so its element type becomes nullable. It is refused inside another array_expand() and in filter(), until(), duplicateRow(), aggregate(), over() and onEach().
Before: +--+-------------------+ |id| array| +--+-------------------+ | 1|{"a":1,"b":2,"c":3}| +--+-------------------+
After: +--+--------+ |id|expanded| +--+--------+ | 1| 1| | 1| 2| | 1| 3| +--+--------+
Parameters
- $expand : ArrayExpand = ArrayExpand::VALUES
Return values
ArrayExpandgreaterThan()
public
greaterThan(mixed $ref) : GreaterThan
Parameters
- $ref : mixed
Return values
GreaterThangreaterThanEqual()
public
greaterThanEqual(mixed $ref) : GreaterThanEqual
Parameters
- $ref : mixed
Return values
GreaterThanEqualhasAlias()
public
hasAlias() : bool
Return values
boolhash()
public
hash([Algorithm $algorithm = new NativePHPHash() ]) : Hash
Parameters
- $algorithm : Algorithm = new NativePHPHash()
Return values
HashhtmlQuerySelector()
public
htmlQuerySelector(ScalarFunction|string $path) : HTMLQuerySelector
Parameters
- $path : ScalarFunction|string
Return values
HTMLQuerySelectorhtmlQuerySelectorAll()
public
htmlQuerySelectorAll(ScalarFunction|string $path) : HTMLQuerySelectorAll
Parameters
- $path : ScalarFunction|string
Return values
HTMLQuerySelectorAllindexOf()
Returns the index of given $needle in string.
public
indexOf(ScalarFunction|string $needle[, ScalarFunction|bool $ignoreCase = false ][, ScalarFunction|int $offset = 0 ]) : IndexOf
Parameters
- $needle : ScalarFunction|string
- $ignoreCase : ScalarFunction|bool = false
- $offset : ScalarFunction|int = 0
Return values
IndexOfindexOfLast()
Returns the last index of given $needle in string.
public
indexOfLast(ScalarFunction|string $needle[, ScalarFunction|bool $ignoreCase = false ][, ScalarFunction|int $offset = 0 ]) : IndexOfLast
Parameters
- $needle : ScalarFunction|string
- $ignoreCase : ScalarFunction|bool = false
- $offset : ScalarFunction|int = 0
Return values
IndexOfLastinit()
public
static init(string|Reference $ref) : Reference
Parameters
- $ref : string|Reference
Return values
Referenceis()
public
is(Reference $ref) : bool
Parameters
- $ref : Reference
Return values
boolisEmpty()
public
isEmpty() : IsEmpty
Return values
IsEmptyisEven()
public
isEven() : Equals
Return values
EqualsisFalse()
public
isFalse() : Same
Return values
SameisIn()
public
isIn(ScalarFunction|array<string|int, mixed> $haystack) : IsIn
Parameters
- $haystack : ScalarFunction|array<string|int, mixed>
Return values
IsInisNotNull()
public
isNotNull() : IsNotNull
Return values
IsNotNullisNotNumeric()
public
isNotNumeric() : IsNotNumeric
Return values
IsNotNumericisNull()
public
isNull() : IsNull
Return values
IsNullisNumeric()
public
isNumeric() : IsNumeric
Return values
IsNumericisOdd()
public
isOdd() : NotEquals
Return values
NotEqualsisTrue()
public
isTrue() : Same
Return values
SameisType()
public
isType(string|Type<string|int, mixed> ...$types) : IsType
Parameters
- $types : string|Type<string|int, mixed>
Return values
IsTypeisUtf8()
Check string is utf8 and returns true or false.
public
isUtf8() : IsUtf8
Return values
IsUtf8jsonDecode()
public
jsonDecode([ScalarFunction|int $flags = JSON_THROW_ON_ERROR ]) : JsonDecode
Parameters
- $flags : ScalarFunction|int = JSON_THROW_ON_ERROR
Return values
JsonDecodejsonEncode()
public
jsonEncode([ScalarFunction|int $flags = JSON_THROW_ON_ERROR ]) : JsonEncode
Parameters
- $flags : ScalarFunction|int = JSON_THROW_ON_ERROR
Return values
JsonEncodelessThan()
public
lessThan(mixed $ref) : LessThan
Parameters
- $ref : mixed
Return values
LessThanlessThanEqual()
public
lessThanEqual(ScalarFunction $ref) : LessThanEqual
Parameters
- $ref : ScalarFunction
Return values
LessThanEquallist()
public
list() : ListFunctions
Return values
ListFunctionsliteral()
public
literal(mixed $value) : Literal
Parameters
- $value : mixed
Return values
Literallower()
public
lower() : ToLower
Return values
ToLowerminus()
public
minus(ScalarFunction|int|float $ref) : Minus
Parameters
- $ref : ScalarFunction|int|float
Return values
Minusmod()
public
mod(ScalarFunction|int $value) : Mod
Parameters
- $value : ScalarFunction|int
Return values
ModmodifyDateTime()
public
modifyDateTime(string|ScalarFunction $modifier) : ModifyDateTime
Parameters
- $modifier : string|ScalarFunction
Return values
ModifyDateTimemultiply()
public
multiply(ScalarFunction|int|float $value) : Multiply
Parameters
- $value : ScalarFunction|int|float
Return values
Multiplyname()
public
name() : string
Return values
stringnotEquals()
public
notEquals(mixed $value) : NotEquals
Parameters
- $value : mixed
Return values
NotEqualsnotSame()
public
notSame(mixed $value) : NotSame
Parameters
- $value : mixed
Return values
NotSamenumberFormat()
public
numberFormat([ScalarFunction|int $decimals = 2 ][, ScalarFunction|string $decimalSeparator = '.' ][, ScalarFunction|string $thousandsSeparator = ',' ]) : NumberFormat
Parameters
- $decimals : ScalarFunction|int = 2
- $decimalSeparator : ScalarFunction|string = '.'
- $thousandsSeparator : ScalarFunction|string = ','
Return values
NumberFormatonEach()
Execute a scalar function on each element of an array/list/map/structure entry.
public
onEach(ScalarFunction $function[, bool $preserveKeys = true ]) : OnEach
In order to use this function, you need to provide a reference to the "element" that will be used in the function.
Example: $df->withEntry('array', ref('array')->onEach(ref('element')->cast(type_string())))
Parameters
- $function : ScalarFunction
- $preserveKeys : bool = true
Return values
OnEachor()
public
or(ScalarFunction $function) : Any
Parameters
- $function : ScalarFunction
Return values
AnyorNot()
public
orNot(ScalarFunction $function) : Any
Parameters
- $function : ScalarFunction
Return values
Anyplus()
public
plus(ScalarFunction|int|float $ref) : Plus
Parameters
- $ref : ScalarFunction|int|float
Return values
Pluspower()
public
power(ScalarFunction|int $value) : Power
Parameters
- $value : ScalarFunction|int
Return values
Powerprepend()
public
prepend(ScalarFunction|string $prefix) : Prepend
Parameters
- $prefix : ScalarFunction|string
Return values
Prependregex()
public
regex(ScalarFunction|string $pattern[, int $flags = 0 ][, ScalarFunction|int $offset = 0 ]) : Regex
Parameters
- $pattern : ScalarFunction|string
- $flags : int = 0
- $offset : ScalarFunction|int = 0
Return values
RegexregexAll()
public
regexAll(ScalarFunction|string $pattern[, int $flags = 0 ][, ScalarFunction|int $offset = 0 ]) : RegexAll
Parameters
- $pattern : ScalarFunction|string
- $flags : int = 0
- $offset : ScalarFunction|int = 0
Return values
RegexAllregexMatch()
public
regexMatch(ScalarFunction|string $pattern[, ScalarFunction|int $flags = 0 ][, ScalarFunction|int $offset = 0 ]) : RegexMatch
Parameters
- $pattern : ScalarFunction|string
- $flags : ScalarFunction|int = 0
- $offset : ScalarFunction|int = 0
Return values
RegexMatchregexMatchAll()
public
regexMatchAll(ScalarFunction|string $pattern[, ScalarFunction|int $flags = 0 ][, ScalarFunction|int $offset = 0 ]) : RegexMatchAll
Parameters
- $pattern : ScalarFunction|string
- $flags : ScalarFunction|int = 0
- $offset : ScalarFunction|int = 0
Return values
RegexMatchAllregexReplace()
public
regexReplace(ScalarFunction|string $pattern, ScalarFunction|string $replacement[, ScalarFunction|int|null $limit = null ]) : RegexReplace
Parameters
- $pattern : ScalarFunction|string
- $replacement : ScalarFunction|string
- $limit : ScalarFunction|int|null = null
Return values
RegexReplacerepeat()
public
repeat(ScalarFunction|int $times) : Repeat
Parameters
- $times : ScalarFunction|int
Return values
Repeatresolve()
Kept on the leaf rather than inlined in the resolver so $alias/$sort copying stays in the class that owns those fields - the resolver never learns the leaf's internal shape.
public
resolve(Definition $definition) : ResolvedReference
The Definition's type and nullability are fused here, at the resolver boundary. This is also the one place the fusion can fail - type_optional() refuses a multi-member UnionType, so a nullable UnionDefinition has no expressible returns(). Doing it here is what keeps ResolvedReference::returns() total.
Parameters
- $definition : Definition
Return values
ResolvedReferenceresolved()
True when this node and every node in children() can answer returns().
public
resolved() : bool
Return values
boolreturns()
The type of the column this function produces, before any row is read.
public
returns() : Type<string|int, mixed>
Return values
Type<string|int, mixed>reverse()
public
reverse() : Reverse
Return values
Reverseround()
public
round([ScalarFunction|int $precision = 2 ][, ScalarFunction|int $mode = PHP_ROUND_HALF_UP ]) : Round
Parameters
- $precision : ScalarFunction|int = 2
- $mode : ScalarFunction|int = PHP_ROUND_HALF_UP
Return values
Roundsame()
public
same(mixed $value) : Same
Parameters
- $value : mixed
Return values
Samesanitize()
public
sanitize([ScalarFunction|string $placeholder = '*' ][, ScalarFunction|int|null $skipCharacters = null ]) : Sanitize
Parameters
- $placeholder : ScalarFunction|string = '*'
- $skipCharacters : ScalarFunction|int|null = null
Return values
Sanitizesize()
public
size() : Size
Return values
Sizeslug()
public
slug([ScalarFunction|string $separator = '-' ][, ScalarFunction|string|null $locale = null ][, ScalarFunction|null|array<string|int, mixed> $symbolsMap = null ]) : Slug
Parameters
- $separator : ScalarFunction|string = '-'
- $locale : ScalarFunction|string|null = null
- $symbolsMap : ScalarFunction|null|array<string|int, mixed> = null
Return values
Slugsort()
public
sort() : SortOrder
Return values
SortOrdersplit()
public
split(ScalarFunction|string $separator[, ScalarFunction|int $limit = PHP_INT_MAX ]) : Split
Parameters
- $separator : ScalarFunction|string
- $limit : ScalarFunction|int = PHP_INT_MAX
Return values
Splitsprintf()
public
sprintf(ScalarFunction|float|int|string|null ...$params) : Sprintf
Parameters
- $params : ScalarFunction|float|int|string|null
Return values
SprintfstartsWith()
public
startsWith(ScalarFunction|string $needle) : StartsWith
Parameters
- $needle : ScalarFunction|string
Return values
StartsWithstringAfter()
Returns the contents found after the first occurrence of the given string.
public
stringAfter(ScalarFunction|string $needle[, ScalarFunction|bool $includeNeedle = false ]) : StringAfter
Parameters
- $needle : ScalarFunction|string
- $includeNeedle : ScalarFunction|bool = false
Return values
StringAfterstringAfterLast()
Returns the contents found after the last occurrence of the given string.
public
stringAfterLast(ScalarFunction|string $needle[, ScalarFunction|bool $includeNeedle = false ]) : StringAfterLast
Parameters
- $needle : ScalarFunction|string
- $includeNeedle : ScalarFunction|bool = false
Return values
StringAfterLaststringBefore()
Returns the contents found before the first occurrence of the given string.
public
stringBefore(ScalarFunction|string $needle[, ScalarFunction|bool $includeNeedle = false ]) : StringBefore
Parameters
- $needle : ScalarFunction|string
- $includeNeedle : ScalarFunction|bool = false
Return values
StringBeforestringBeforeLast()
Returns the contents found before the last occurrence of the given string.
public
stringBeforeLast(ScalarFunction|string $needle[, ScalarFunction|bool $includeNeedle = false ]) : StringBeforeLast
Parameters
- $needle : ScalarFunction|string
- $includeNeedle : ScalarFunction|bool = false
Return values
StringBeforeLaststringContainsAny()
public
stringContainsAny(array<string|int, string>|ScalarFunction $needles) : StringContainsAny
Parameters
- $needles : array<string|int, string>|ScalarFunction
Return values
StringContainsAnystringEqualsTo()
public
stringEqualsTo(ScalarFunction|string $string) : StringEqualsTo
Parameters
- $string : ScalarFunction|string
Return values
StringEqualsTostringFold()
Returns a string that you can use in case-insensitive comparisons.
public
stringFold() : StringFold
Return values
StringFoldstringMatch()
public
stringMatch(ScalarFunction|string $pattern) : StringMatch
Parameters
- $pattern : ScalarFunction|string
Return values
StringMatchstringMatchAll()
public
stringMatchAll(ScalarFunction|string $pattern) : StringMatchAll
Parameters
- $pattern : ScalarFunction|string
Return values
StringMatchAllstringNormalize()
public
stringNormalize([ScalarFunction|int $form = Normalizer::NFC ]) : StringNormalize
Parameters
- $form : ScalarFunction|int = Normalizer::NFC
Return values
StringNormalizestringStyle()
Covert string to a style from enum list, passed in parameter.
public
stringStyle(ScalarFunction|string|StringStyles $style) : StringStyle
Can be string "upper" or StringStyles::UPPER for Upper (example).
Parameters
- $style : ScalarFunction|string|StringStyles
Return values
StringStylestringTitle()
Changes all graphemes/code points to "title case".
public
stringTitle([ScalarFunction|bool $allWords = false ]) : StringTitle
Parameters
- $allWords : ScalarFunction|bool = false
Return values
StringTitlestringWidth()
public
stringWidth() : StringWidth
Return values
StringWidthstrPad()
public
strPad(int $length[, string $pad_string = ' ' ][, int $type = STR_PAD_RIGHT ]) : StrPad
Parameters
- $length : int
- $pad_string : string = ' '
- $type : int = STR_PAD_RIGHT
Return values
StrPadstrPadBoth()
public
strPadBoth(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
- $length : int
- $pad_string : string = ' '
Return values
StrPadstrPadLeft()
public
strPadLeft(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
- $length : int
- $pad_string : string = ' '
Return values
StrPadstrPadRight()
public
strPadRight(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
- $length : int
- $pad_string : string = ' '
Return values
StrPadstrReplace()
public
strReplace(array<string|int, string>|ScalarFunction|string $search, array<string|int, string>|ScalarFunction|string $replace) : StrReplace
Parameters
- $search : array<string|int, string>|ScalarFunction|string
- $replace : array<string|int, string>|ScalarFunction|string
Return values
StrReplacestructure()
public
structure() : StructureFunctions
Return values
StructureFunctionsto()
public
to() : string
Return values
stringtoDate()
public
toDate([ScalarFunction|string $format = DateTimeInterface::RFC3339 ][, ScalarFunction|DateTimeZone $timeZone = new DateTimeZone('UTC') ]) : ToDate
Parameters
- $format : ScalarFunction|string = DateTimeInterface::RFC3339
-
- current format of the date that will be used to create DateTimeImmutable instance
- $timeZone : ScalarFunction|DateTimeZone = new DateTimeZone('UTC')
Return values
ToDatetoDateTime()
public
toDateTime([ScalarFunction|string $format = 'Y-m-d H:i:s' ][, DateTimeZone|ScalarFunction $timeZone = new DateTimeZone('UTC') ]) : ToDateTime
Parameters
- $format : ScalarFunction|string = 'Y-m-d H:i:s'
-
- current format of the date that will be used to create DateTimeImmutable instance
- $timeZone : DateTimeZone|ScalarFunction = new DateTimeZone('UTC')
Return values
ToDateTimetrim()
public
trim([Type $type = Type::BOTH ][, string $characters = " \t\n\r\x00\v" ]) : Trim
Parameters
- $type : Type = Type::BOTH
- $characters : string = " \t\n\r\x00\v"
Return values
Trimtruncate()
public
truncate(ScalarFunction|int $length[, ScalarFunction|string $ellipsis = '...' ]) : Truncate
Parameters
- $length : ScalarFunction|int
- $ellipsis : ScalarFunction|string = '...'
Return values
TruncateunicodeLength()
public
unicodeLength() : UnicodeLength
Return values
UnicodeLengthunpack()
Unpacks each element of an array into a new entry, using the array key as the entry name.
public
unpack(Schema $schema) : ArrayUnpack
Before: +--+-------------------+ |id| array| +--+-------------------+ | 1|{"a":1,"b":2,"c":3}| | 2|{"d":4,"e":5,"f":6}| +--+-------------------+
After: +--+-----+-----+-----+-----+-----+ |id|arr.b|arr.c|arr.d|arr.e|arr.f| +--+-----+-----+-----+-----+-----+ | 1| 2| 3| | | | | 2| | | 4| 5| 6| +--+-----+-----+-----+-----+-----+
Parameters
- $schema : Schema
Return values
ArrayUnpackupper()
public
upper() : ToUpper
Return values
ToUpperwithChildren()
A copy of this node with $children in place of children(): same count, same order, same per-element narrowing. Never mutates $this.
public
withChildren(array<int, FunctionTree> $children) : static
Parameters
- $children : array<int, FunctionTree>
Return values
staticwordwrap()
public
wordwrap(ScalarFunction|int $width[, ScalarFunction|string $break = "\n" ][, ScalarFunction|bool $cut = false ]) : Wordwrap
Parameters
- $width : ScalarFunction|int
- $break : ScalarFunction|string = "\n"
- $cut : ScalarFunction|bool = false
Return values
Wordwrapxpath()
public
xpath(string $string) : XPath
Parameters
- $string : string