Flow PHP

StringAfterLast implements ScalarFunction uses ScalarFunctionChain

FinalYes

Interfaces

ScalarFunction

Methods

__construct()  : mixed
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.
ascii()  : Ascii
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
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()  : string|null
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
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.
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
literal()  : Literal
lower()  : ToLower
minus()  : Minus
mod()  : Mod
modifyDateTime()  : ModifyDateTime
multiply()  : Multiply
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
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
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
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

arrayFilter()

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
ArrayFilter

arrayKeep()

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
ArrayKeep

arrayKeys()

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
ArrayKeys

arrayValues()

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
ArrayValues

call()

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
CallUserFunc

cast()

public cast(string|Type<string|int, mixed> $type) : Cast
Parameters
$type : string|Type<string|int, mixed>
Return values
Cast

expand()

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
ArrayExpand

isType()

public isType(string|Type<string|int, mixed> ...$types) : IsType
Parameters
$types : string|Type<string|int, mixed>
Return values
IsType

onEach()

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
OnEach

returns()

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>

strPad()

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
StrPad

strPadBoth()

public strPadBoth(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
$length : int
$pad_string : string = ' '
Return values
StrPad

strPadLeft()

public strPadLeft(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
$length : int
$pad_string : string = ' '
Return values
StrPad

strPadRight()

public strPadRight(int $length[, string $pad_string = ' ' ]) : StrPad
Parameters
$length : int
$pad_string : string = ' '
Return values
StrPad

unpack()

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
ArrayUnpack

withChildren()

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
static
On this page

Search results