includes/utilsfunctions.php

Redactor

Functions

datasync_pluckAttribute()

datasync_pluckAttribute(string $key,  $arrSource) : array

Takes an array of objects and returns an array of $key from each object.

Parameters

string $key

The attribute to pluck from the array of objects

$arrSource

Returns

array —

The array of $keys from each object.

datasync_pluckColumn()

datasync_pluckColumn(string $key,  $arrSource) : array

Takes a multi dimensional array and returns an array of $key from each row.

Similar to array_column in later versions of PHP

Parameters

string $key

The column to pluck from the rows

$arrSource

Returns

array —

The array of $keys from each row.

datasync_redactResultSort()

datasync_redactResultSort( $a,  $b)

Parameters

$a
$b

datasync_getMostRestrictive()

datasync_getMostRestrictive( $a,  $b)

Parameters

$a
$b

datasync_isPositiveInteger()

datasync_isPositiveInteger( $value)

Parameters

$value

datasync_escapeRegexString()

datasync_escapeRegexString( $content)

Parameters

$content