WPML Functional Programming Library
Table of Contents
Fns
always
Curried :: a → ( * → a )
Returns a function that always returns the given value.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
converge
- Curried :: ( ( x1, x2, … ) → z ) → [( ( a, b, … ) → x1 ), ( ( a, b, … ) → x2 ), …] → ( a → b → … → z )
Accepts a converging function and a list of branching functions and returns a new function. The arity of the new function is the same as the arity of the longest branching function. When invoked, this new function is applied to some arguments, and each branching function is applied to those same arguments. The results of each branching function are passed as arguments to the converging function to produce the return value.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$convergingFn |
mixed |
|
$...$branchingFns |
mixed |
|
map
- Curried :: ( a→b )→f a→f b
Takes a function and a functor, applies the function to each of the functor's values, and returns a functor of the same shape.
And array is considered a functor
Dispatches to the map method of the second argument, if present
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$target |
mixed |
|
static callable|mixed each ( ...$fn, ...$target ) - Curried :: ( a→b )→f a→f b
identity
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$mixed |
mixed |
|
tap
- Curried :: fn->data->data
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$callable |
mixed |
|
$mixed |
mixed |
|
reduce
- Curried :: ( ( a, b ) → a ) → a → [b] → a
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$initial |
mixed |
|
$...$target |
mixed |
|
reduceRight
- Curried :: ( ( a, b ) → a ) → a → [b] → a
Takes a function, an initial value and an array and returns the result.
The function receives two values, the accumulator and the current value, and should return a result.
The array values are passed to the function in the reverse order.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$initial |
mixed |
|
$...$target |
mixed |
|
filter
- Curried :: ( a → bool ) → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$target |
mixed |
|
reject
- Curried :: ( a → bool ) → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$target |
mixed |
|
value
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$mixed |
mixed |
|
constructN
- Curried :: int → string → object
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$argCount |
mixed |
|
$...$className |
mixed |
|
ascend
- Curried :: ( a → b ) → a → a → int
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$a |
mixed |
|
$...$b |
mixed |
|
descend
- Curried :: ( a → b ) → a → a → int
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$a |
mixed |
|
$...$b |
mixed |
|
useWith
- Curried :: ( ( x1, x2, … ) → z ) → [( a → x1 ), ( b → x2 ), …] → ( a → b → … → z )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$transformations |
mixed |
|
nthArg
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
either
- Curried:: ( a → b ) → ( b → c ) → Either a b → c
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$f |
mixed |
|
$...$g |
mixed |
|
$...$e |
mixed |
|
maybe
- Curried:: b → ( a → b ) → Maybe a → b
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$v |
mixed |
|
$...$f |
mixed |
|
$...$m |
mixed |
|
isRight
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$e |
mixed |
|
isLeft
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$e |
mixed |
|
isJust
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$m |
mixed |
|
isNothing
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$m |
mixed |
|
T
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$_ |
mixed |
|
F
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$_ |
mixed |
|
safe
- Curried :: ( a → b ) → ( a → Maybe b )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
make
- Curried :: string → object
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$className |
mixed |
|
makeN
- Curried :: int → string → object
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$argCount |
mixed |
|
$...$className |
mixed |
|
unary
- Curried:: ( * → b ) → ( a → b )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
memorizeWith
- Curried :: ( *… → String ) → ( *… → a ) → ( *… → a )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$cacheKeyFn |
mixed |
|
$...$fn |
mixed |
|
memorize
- Curried :: ( *… → a ) → ( *… → a )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
once
- Curried :: ( *… → a ) → ( *… → a )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
withNamedLock
- Curried :: String → ( *… → String ) → ( *… → a ) → ( *… → a )
Creates a new function that is locked so that it wont be called recursively. Multiple functions can use the same lock so they are blocked from calling each other recursively
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$name |
mixed |
|
$...$returnFn |
mixed |
|
$...$fn |
mixed |
|
withoutRecursion
- Curried :: ( *… → String ) → ( *… → a ) → ( *… → a )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$returnFn |
mixed |
|
$...$fn |
mixed |
|
liftA2
- Curried :: ( a → b → c ) → m a → m b → m c
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$monadA |
mixed |
|
$...$monadB |
mixed |
|
liftA3
- Curried :: ( a → b → c → d ) → m a → m b → m c → m d
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$monadA |
mixed |
|
$...$monadB |
mixed |
|
$...$monadC |
mixed |
|
liftN
- Curried :: Number->( ( * ) → a ) → ( *m ) → m a
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$fn |
mixed |
|
$...$monad |
mixed |
|
until
- Curried :: ( b → bool ) → [( a → b )] → a → b
Executes consecutive functions until their $predicate($fn(...$args)) is true. When a result fulfils predicate then it is returned.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$fns |
mixed |
|
init
noop
maybeToEither
Curried function that transforms a Maybe into an Either.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$or |
mixed|null |
|
$maybe |
\WPML\FP\Maybe|null |
|
Logic
- Full name: \WPML\FP\Logic
not
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$mixed |
mixed |
|
isNotNull
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$mixed |
mixed |
|
ifElse
- Curried :: ( a->bool )->callable->callable->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$first |
mixed |
|
$...$second |
mixed |
|
$...$data |
mixed |
|
when
- Curried :: ( a->bool )->callable->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$fn |
mixed |
|
unless
- Curried :: ( a->bool )->callable->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$fn |
mixed |
|
cond
- Curried :: [( a->bool ), callable]->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$conditions |
mixed |
|
$...$fn |
mixed |
|
both
- Curried :: ( a → bool ) → ( a → bool ) → a → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
$...$data |
mixed |
|
allPass
- Curried :: [( *… → bool )] → ( *… → bool )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicates |
mixed |
|
$...$data |
mixed |
|
anyPass
- Curried :: [( *… → bool )] → ( *… → bool )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicates |
mixed |
|
$...$data |
mixed |
|
complement
- Curried :: ( *… → * ) → ( *… → bool )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
defaultTo
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
either
- Curried :: ( *… → bool ) → ( *… → bool ) → ( *… → bool )
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
static callable|mixed until ( ...$predicate, ...$transform, ...$data ) - Curried :: ( a → bool ) → ( a → a ) → a → a
propSatisfies
- Curried :: ( a → bool ) → String → [String => a] → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$prop |
mixed |
|
$...$data |
mixed |
|
static callable|bool isArray ( ...$a ) - Curried :: a → bool
static callable|bool isMappable ( ...$a ) - Curried :: a → bool
isEmpty
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
isNotEmpty
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
firstSatisfying
- Curried:: callable->callable[]->mixed->mixed
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$functions |
mixed |
|
$...$data |
mixed |
|
isTruthy
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$data |
mixed |
|
init
Lst
Lst class contains functions for working on ordered arrays indexed with numerical keys
append
- Curried :: mixed->array->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$mixed |
mixed |
|
$array |
mixed |
|
fromPairs
- Curried :: a, b → [a => b]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$array |
mixed |
|
toObj
- Curried :: array → object
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$array |
mixed |
|
pluck
- Curried :: string → array → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$prop |
mixed |
|
$...$array |
mixed |
|
partition
- Curried :: ( a → bool ) → [a] → a], [a
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$target |
mixed |
|
sort
- Curried :: ( ( a, a ) → int ) → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$target |
mixed |
|
unfold
- Curried :: ( a → [b] ) → * → [b]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$fn |
mixed |
|
$...$seed |
mixed |
|
zip
- Curried :: [a] → [b] → a, b
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
zipObj
- Curried :: [a] → [b] → [a => b]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
zipWith
- Curried :: ( ( a, b ) → c ) → [a] → [b] → [c]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$f |
mixed |
|
$...$a |
mixed |
|
$...$b |
mixed |
|
join
- Curried :: string → [a] → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$glue |
mixed |
|
$...$array |
mixed |
|
joinWithCommasAndAnd
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
concat
- Curried :: [a] → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
find
- Curried :: ( a → bool ) → [a] → a | null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$array |
mixed |
|
flattenToDepth
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$depth |
mixed |
|
$...$array |
mixed |
|
flatten
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
includes
- Curried :: a → [a] → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$val |
mixed |
|
$...$array |
mixed |
|
includesAll
- Curried :: [a] → [a] → bool
Determines if all the values are in the given array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$values |
mixed |
|
$...$array |
mixed |
|
nth
- Curried :: int → [a] → a | null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$array |
mixed |
|
first
- Curried :: [a, b] → a | null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
last
- Curried :: [a, b] → b | null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
length
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
take
- Curried :: int → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$array |
mixed |
|
takeLast
- Curried :: int → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$array |
mixed |
|
slice
- Curried :: int → int->[a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$offset |
mixed |
|
$...$limit |
mixed |
|
$...$array |
mixed |
|
drop
- Curried :: int → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$array |
mixed |
|
dropLast
- Curried :: int → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$n |
mixed |
|
$...$array |
mixed |
|
makePair
- Curried :: mixed → mixed → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
static callable|array make ( ...$a ) - Curried :: mixed → array
insert
- Curried :: int → mixed → array → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$index |
mixed |
|
$...$v |
mixed |
|
$...$array |
mixed |
|
range
- Curried :: int → int → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$from |
mixed |
|
$...$to |
mixed |
|
xprod
- Curried :: [a]->[b]->[a, b]
Creates a new list out of the two supplied by creating each possible pair from the lists.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
prepend
Returns a new array with the given element at the front, followed by the contents of the list.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$val |
mixed |
|
$...$array |
mixed |
|
reverse
Returns a new array with the elements reversed.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
init
keyBy
Curried function that keys the array by the given key
keyBy :: string -> array -> array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$key |
string |
|
$array |
array<mixed,mixed> |
|
keyWith
Curried function that wraps each item in array with pair: [$key => $item1]
keyWith :: string -> array -> array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$key |
string |
|
$array |
array<mixed,mixed> |
|
diff
This method will return the values in the original collection that are not present in the given collection:
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$array1 |
array|\WPML\Collect\Support\Collection |
|
$array2 |
array|\WPML\Collect\Support\Collection |
|
repeat
It returns array of $val elements repeated $times times.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$val |
mixed |
|
$times |
integer |
|
sum
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$param |
array|\WPML\Collect\Support\Collection |
|
Math
multiply
- Curried :: Number → Number → Number
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
divide
- Curried :: Number → Number → Number
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
add
- Curried :: Number → Number → Number
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
product
- Curried :: [Number] → Number
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$array |
mixed |
|
init
Obj
prop
- Curried :: string->Collection|array|object->mixed|null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$obj |
mixed |
|
propOr
- Curried :: mixed->string->Collection|array|object->mixed|null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$default |
mixed |
|
$...$key |
mixed |
|
$...$obj |
mixed |
|
props
- Curried :: [keys] → Collection|array|object → [v]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$keys |
mixed |
|
$...$obj |
mixed |
|
addProp
- Curried :: string->callable->object|array->object->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$transformation |
mixed |
|
$...$obj |
mixed |
|
removeProp
- Curried :: string->object|array->object->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$obj |
mixed |
|
renameProp
- Curried :: string->string->object|array->object->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$newKey |
mixed |
|
$...$obj |
mixed |
|
path
- Curried :: array->Collection|array|object->mixed|null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$path |
mixed |
|
$...$obj |
mixed |
|
pathOr
- Curried :: mixed → array → Collection|array|object → mixed
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$default |
mixed |
|
$...$path |
mixed |
|
$...$obj |
mixed |
|
assoc
- Curried :: string->mixed->Collection|array|object->mixed|null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$value |
mixed |
|
$...$item |
mixed |
|
assocPath
- Curried :: array->mixed->Collection|array|object->mixed|null
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$path |
mixed |
|
$...$value |
mixed |
|
$...$item |
mixed |
|
lens
- Curried :: callable->callable->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$getter |
mixed |
|
$...$setter |
mixed |
|
lensProp
- Curried :: string->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$prop |
mixed |
|
lensPath
- Curried :: array->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$path |
mixed |
|
lensMapped
- Curried :: callable->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$toFunctorFn |
mixed |
|
lensMappedProp
- Curried :: string->callable
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$prop |
mixed |
|
view
- Curried :: callable->Collection|array|object->mixed
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$lens |
mixed |
|
$...$obj |
mixed |
|
set
- Curried :: callable->mixed->Collection|array|object->mixed
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$lens |
mixed |
|
$...$value |
mixed |
|
$...$obj |
mixed |
|
over
- Curried :: callable->callable->Collection|array|object->mixed
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$lens |
mixed |
|
$...$transformation |
mixed |
|
$...$obj |
mixed |
|
pick
- Curried :: array->Collection|array->Collection|array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$props |
mixed |
|
$...$obj |
mixed |
|
pickAll
- Curried :: array->Collection|array->Collection|array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$props |
mixed |
|
$...$obj |
mixed |
|
pickBy
- Curried :: ( ( v, k ) → bool ) → Collection|array->Collection|array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$obj |
mixed |
|
pickByKey
- Curried :: ( ( k ) → bool ) → Collection|array->callable|Collection|array|object
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$predicate |
mixed |
|
$...$obj |
mixed |
|
project
- Curried :: array->Collection|array->Collection|array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$props |
mixed |
|
$...$target |
mixed |
|
where
- Curried :: [string → ( * → bool )] → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$condition |
array |
|
has
- Curried :: string → a → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$prop |
mixed |
|
$...$item |
mixed |
|
evolve
- Curried :: array → array → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$transformations |
mixed |
|
$...$item |
mixed |
|
objOf
- Curried :: string->mixed->array
Creates an object containing a single key:value pair.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$key |
mixed |
|
$...$value |
mixed |
|
keys
- Curried :: object|array->array
Returns
- keys if argument is an array
- public properties' names if argument is an object
- keys if argument is Collection
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$obj |
mixed |
|
values
- Curried :: object|array->array
Returns
- values if argument is an array
- public properties' values if argument is an object
- values if argument is Collection
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$obj |
mixed |
|
replaceRecursive
- Curried :: array->array->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$array |
mixed |
|
$...$target |
mixed |
|
toArray
- Curried :: Collection|Object->array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
| `$Collection |
Object` |
mixed |
init
without
Curried :: mixed → array|object|Collection → array|object|Collection
function to remove an item by key from an array.
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$key |
string|integer |
|
$item |
array|object|\WPML\Collect\Support\Collection|null |
|
Relation
- Full name: \WPML\FP\Relation
equals
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
lt
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
lte
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
gt
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
gte
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
propEq
- Curried :: String → a → array → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$prop |
mixed |
|
$...$value |
mixed |
|
$...$obj |
mixed |
|
sortWith
- Curried :: [(a, a) → int] → [a] → [a]
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$comparators |
mixed |
|
$...$array |
mixed |
|
init
Str
tail
- Curried :: string->string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$string |
mixed |
|
split
- Curried :: string->string->string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$delimiter |
mixed |
|
$...$str |
mixed |
|
includes
- Curried :: string → string → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$needle |
mixed |
|
$...$str |
mixed |
|
trim
- Curried :: string → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$trim |
mixed |
|
$...$str |
mixed |
|
trimPrefix
- Curried :: string → string → string
Trims the prefix from the start of the string if the prefix exists
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$trim |
mixed |
|
$...$str |
mixed |
|
concat
- Curried :: string → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$a |
mixed |
|
$...$b |
mixed |
|
sub
- Curried :: int → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$start |
mixed |
|
$...$str |
mixed |
|
startsWith
- Curried :: string → string → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$test |
mixed |
|
$...$str |
mixed |
|
endsWith
- Curried :: string → string → bool
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$test |
mixed |
|
$...$str |
mixed |
|
pos
- Curried :: string → string → int
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$test |
mixed |
|
$...$str |
mixed |
|
len
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$str |
mixed |
|
replace
- Curried :: string → string → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$find |
mixed |
|
$...$replace |
mixed |
|
$...$str |
mixed |
|
pregReplace
- Curried :: string → string → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$pattern |
mixed |
|
$...$replace |
mixed |
|
$...$str |
mixed |
|
match
- Curried :: string → string → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$pattern |
mixed |
|
$...$str |
mixed |
|
matchAll
- Curried :: string → string → array
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$pattern |
mixed |
|
$...$str |
mixed |
|
wrap
- Curried :: string → string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$...$before |
mixed |
|
$...$after |
mixed |
|
$...$str |
mixed |
|
toUpper
- Curried :: string → string
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$string |
mixed |
|
toLower
- Curried :: string → string
Wraps a string inside 2 other strings
- This method is static.
Parameters:
| Parameter |
Type |
Description |
$string |
mixed |
|
init
This document was automatically generated from source code comments on 2022-03-07 using phpDocumentor and cvuorinen/phpdoc-markdown-public