Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

RedBeanModelsDataProvider Class Reference

Public Member Functions

 __construct ($id, array $modelClassNamesAndSortAttributes=null, $sortDescending=false, array $modelClassNamesAndSearchAttributeData=null, array $config=array())
 getSort ()
 calculateTotalItemCount ()

Static Public Member Functions

static makeUnionSql (array $modelClassNamesAndSearchAttributeData, array $modelClassNamesAndSortAttributes=null, $sortDescending=false, $offset=null, $limit=null)

Protected Member Functions

 fetchData ()
 makeModelsBySql ($sql)
 fetchKeys ()

Static Protected Member Functions

static makeSubsetUnionSqlQuery ($sqlStatementsToUnion, $offset=null, $count=null, $orderBy=null)

Detailed Description

A data provider that returns models that are from one or more model classes.

Definition at line 40 of file RedBeanModelsDataProvider.php.


Constructor & Destructor Documentation

__construct ( id,
array $  modelClassNamesAndSortAttributes = null,
sortDescending = false,
array $  modelClassNamesAndSearchAttributeData = null,
array $  config = array() 
)
Parameters:
string $id - unique identifier for this data collection.
array $modelClassNamesAndSortAttributes
boolean $sortDescending
array $modelClassNamesAndSearchAttributeData. Array of model class names and search attributes. This supports multiple arrays of the same model class names whereas modelClassNamesAndSortAttributes does not support that. Example:

            <?php
                $modelClassNamesAndSortAttributes = array(array('ModelA' => array('attributeA' => 'value'))
                                                          array('ModelB' => array('attributeB' => 'value')));
            ?>
array $config

Definition at line 62 of file RedBeanModelsDataProvider.php.


Member Function Documentation

fetchData (  )  [protected]

See the yii documentation.

Definition at line 85 of file RedBeanModelsDataProvider.php.

static makeUnionSql ( array $  modelClassNamesAndSearchAttributeData,
array $  modelClassNamesAndSortAttributes = null,
sortDescending = false,
offset = null,
limit = null 
) [static]

Public for testing purposes only.

Definition at line 112 of file RedBeanModelsDataProvider.php.

makeModelsBySql ( sql  )  [protected]

Given a unioned sql statement, make the models for the beans returned. The modelClassName is a column name that must be in the select part of the sql statement for each unioned select.

Parameters:
string $sql
Returns:
array of models

Definition at line 171 of file RedBeanModelsDataProvider.php.

getSort (  ) 
Returns:
CSort the sorting object. Sorting using getSort is disabled.

Definition at line 221 of file RedBeanModelsDataProvider.php.

calculateTotalItemCount (  ) 

This function is made public for unit testing. Calculates the total for each of the select statements and adds them up. Setting $selectDistinct to true when calling getCount since this is always true when counting ids.

Returns:
integer - total count across select statements.

Definition at line 232 of file RedBeanModelsDataProvider.php.

fetchKeys (  )  [protected]

See the yii documentation.

Definition at line 250 of file RedBeanModelsDataProvider.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Jan 21 07:10:27 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8