PHP Class IdiormResultSet, idiorm

Author: Simon Holywell ([email protected])
Inheritance: implements Countable, implements IteratorAggregate, implements ArrayAccess, implements Serializable
Show file Open project: j4mie/idiorm

Protected Properties

Property Type Description
$_results array The current result set as an array

Public Methods

Method Description
__call ( string $method, array $params = [] ) : IdiormResultSet Call a method on all models in a result set. This allows for method chaining such as setting a property on all models in a result set or any other batch operation across models.
__construct ( array $results = [] ) Optionally set the contents of the result set by passing in array
as_array ( ) : array Get the current result set as an array
count ( ) : integer Get the number of records in the result set
getIterator ( ) : ArrayIterator Get an iterator for this object. In this case it supports foreaching over the result set.
get_results ( ) : array Get the current result set as an array
offsetExists ( integer | string $offset ) : boolean ArrayAccess
offsetGet ( integer | string $offset ) : mixed ArrayAccess
offsetSet ( integer | string $offset, mixed $value ) ArrayAccess
offsetUnset ( integer | string $offset ) ArrayAccess
serialize ( ) : string Serializable
set_results ( array $results ) Set the contents of the result set by passing in array
unserialize ( string $serialized ) : array Serializable

Method Details

__call() public method

Call a method on all models in a result set. This allows for method chaining such as setting a property on all models in a result set or any other batch operation across models.
public __call ( string $method, array $params = [] ) : IdiormResultSet
$method string
$params array
return IdiormResultSet

__construct() public method

Optionally set the contents of the result set by passing in array
public __construct ( array $results = [] )
$results array

as_array() public method

Get the current result set as an array
public as_array ( ) : array
return array

count() public method

Get the number of records in the result set
public count ( ) : integer
return integer

getIterator() public method

Get an iterator for this object. In this case it supports foreaching over the result set.

get_results() public method

Get the current result set as an array
public get_results ( ) : array
return array

offsetExists() public method

ArrayAccess
public offsetExists ( integer | string $offset ) : boolean
$offset integer | string
return boolean

offsetGet() public method

ArrayAccess
public offsetGet ( integer | string $offset ) : mixed
$offset integer | string
return mixed

offsetSet() public method

ArrayAccess
public offsetSet ( integer | string $offset, mixed $value )
$offset integer | string
$value mixed

offsetUnset() public method

ArrayAccess
public offsetUnset ( integer | string $offset )
$offset integer | string

serialize() public method

Serializable
public serialize ( ) : string
return string

set_results() public method

Set the contents of the result set by passing in array
public set_results ( array $results )
$results array

unserialize() public method

Serializable
public unserialize ( string $serialized ) : array
$serialized string
return array

Property Details

$_results protected property

The current result set as an array
protected array $_results
return array