\Weby\Sloth\Func\ValueBase

Base class for "value" functions, i.e.

functions that are applied to value column instead of entire group.

Summary

Methods
Properties
Constants
cast()
__construct()
onAddGroup()
onUpdateGroup()
setOption()
setOptions()
$name
$alias
$options
$defaultOptions
No constants found
getFuncName()
getStoreColumn()
$operation
N/A
ensureKnownOption()
No private properties found
N/A

Properties

$name

$name : string

Function name.

Type

string

$alias

$alias : string

Function alias.

Type

string

$options

$options : array

Options of the function.

Type

array

$defaultOptions

$defaultOptions : array

Default options of the function.

Type

array

$operation

$operation : \Weby\Sloth\Operation\Base

Reference to the operation.

Type

\Weby\Sloth\Operation\Base

Methods

cast()

cast(  $object) : \Weby\Sloth\Func\Base

"Casts" mixed variable to func.

Auxiliary method for dev purposes. After such cast IDE undestands type of var and we can use code completion functionallity.

Parameters

$object

Returns

\Weby\Sloth\Func\Base

__construct()

__construct(\Weby\Sloth\Operation\Base  $operation) 

Parameters

\Weby\Sloth\Operation\Base $operation

onAddGroup()

onAddGroup(array  $group, string  $groupCol, array  $data, string  $dataCol, mixed  $currValue, mixed  $nextValue) 

Parameters

array $group

Group of output data.

string $groupCol

Col name of output group.

array $data

Row of input data.

string $dataCol

Col name of input row.

mixed $currValue

Current value of column of input row.

mixed $nextValue

Next value of column of input row.

onUpdateGroup()

onUpdateGroup(  $group,   $groupCol,   $data,   $dataCol,   $currValue,   $nextValue) 

Parameters

$group
$groupCol
$data
$dataCol
$currValue
$nextValue

setOption()

setOption(string  $name, mixed  $value) 

Sets single function's option.

Parameters

string $name
mixed $value

setOptions()

setOptions(array  $options) 

Sets multiple function's options.

Parameters

array $options

getFuncName()

getFuncName() 

getStoreColumn()

getStoreColumn(  $groupCol,   $dataCol,   $storeCol) 

Parameters

$groupCol
$dataCol
$storeCol

ensureKnownOption()

ensureKnownOption(  $name) 

Parameters

$name