public | #__construct(array$resultset) Initialises our resultset handler Initialises our resultset handler Parameters- $resultset
array $resultset The resultset returned
AuthorOverrides |
public array | #getWhere(array$spec,integer$limit= PHP_INT_MAX) Get values matching the filter Get values matching the filter Parameters- $spec
array $spec The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of rows to match
Returnsarray
Author |
protected static boolean | #compare(mixed$value,string$modifier,mixed$modValue) Checks if a the row column matches the filter Checks if a the row column matches the filter Parameters- $value
mixed $value The value in the row- $modifier
string $modifier The modifier ('=','>', '>=' etc)- $modValue
mixed $modValue What the modifier is checking against
Returnsboolean
Author |
publicAlo\Db\Resultset | #keepWhere(array$spec,integer$limit= PHP_INT_MAX) Only keeps vallues in the resultset that match the filter Only keeps vallues in the resultset that match the filter Parameters- $spec
array $spec The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of rows to match
ReturnsAuthor |
publicAlo\Db\Resultset | #deleteWhere(array$spec) Deletes values from the resultset that match the filter Deletes values from the resultset that match the filter Parameters- $spec
array $spec The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]
ReturnsAuthor |
protected array & | #getWhereReferential(array$spec) A clone of getWhere() that returns references to the rows in the dataset instead of a new array A clone of getWhere() that returns references to the rows in the dataset instead of a new array Parameters- $spec
array $spec The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]
Returnsarray
Author |
publicAlo\Db\Resultset | #setValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Sets the value(s) on columns that match the filter Sets the value(s) on columns that match the filter Parameters- $sets
array $sets Array of values to set where the keys are the column names and the values are the values to set- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of rows to modify
ReturnsAuthor |
public boolean|mixed | #applyCallbackWhere(callable$callable,array$where=null) Applies a callback to the rows matching the filter. This will modify the data in the object. Applies a callback to the rows matching the filter. This will modify the data in the object. Parameters- $callable
callable $callable The callback function. It should accept the first parameter which is the array of associative arrays that matches the filter.- $where
array $where
Returnsboolean|mixed false if $callable isn't callable or whatever your callback returns.
Author |
publicAlo\Db\Resultset | #appendValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Appends values in the resultset Appends values in the resultset Parameters- $sets
array $sets Array of values to append where the keys are the column names and the values are the strings to append- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maxumum number of affected rows
ReturnsAuthor |
publicAlo\Db\Resultset | #prependValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Prepends values in the resultset Prepends values in the resultset Parameters- $sets
array $sets Array of values to prepend where the keys are the column names and the values are the strings to prepend- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of affected rows
ReturnsAuthor |
publicAlo\Db\Resultset | #incrementValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Increments a numeric value(or values) in the resultset Increments a numeric value(or values) in the resultset Parameters- $sets
array $sets The increment specs, where the keys are the columns to modify and the values are how much to increment by- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maxumum number of affected rows
ReturnsAuthor |
publicAlo\Db\Resultset | #decrementValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Decrements a numeric value(or values) in the resultset Decrements a numeric value(or values) in the resultset Parameters- $sets
array $sets The decrement specs where the keys are the columns to modify and the values are how much to decrement by- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of affected rows
ReturnsAuthor |
publicAlo\Db\Resultset | #multiplyValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Multiplies numeric values in the resultset Multiplies numeric values in the resultset Parameters- $sets
array $sets The multiplication specs where the keys are columns to modify and the values are how much to multiply by- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of affected rows
ReturnsAuthor |
publicAlo\Db\Resultset | #divideValue(array$sets,array$where=null,integer$limit= PHP_INT_MAX) Divides numeric values in the resultset Divides numeric values in the resultset Parameters- $sets
array $sets The division specs where the keys are columns to modify and the values are how much divide by- $where
array $where The filter associative array where the keys are column names and the values are [modifier,value]. For example to get rows where the column "foo" is greater than 5 and the column "bar" equals "qux" pass the array ['foo' => ['>',5], 'bar' => ['=', 'qux']]- $limit
integer $limit Maximum number of affected rows
ReturnsAuthor |