Свойство | Type | Description | |
---|---|---|---|
$arrModels | Models | ||
$intIndex | integer | Current index | |
$strTable | string | Table name |
Méthode | Description | |
---|---|---|
__construct ( array $arrModels, string $strTable ) | Create a new collection | |
__get ( string $strKey ) : mixed | null | Return an object property | |
__isset ( string $strKey ) : boolean | Check whether a property is set | |
__set ( string $strKey, mixed $varValue ) | Set an object property | |
count ( ) : integer | Return the number of rows in the result set | |
createFromDbResult ( |
Create a new collection from a database result | |
current ( ) : |
Return the current model | |
delete ( ) : integer | Delete the current model and return the number of affected rows | |
fetchAll ( ) : array | Fetch all columns of every row | |
fetchEach ( string $strKey ) : array | Fetch a column of each row | |
first ( ) : static | Go to the first row | |
getIterator ( ) : ArrayIterator | Retrieve the iterator object | |
getModels ( ) : |
Return the models as array | |
getRelated ( string $strKey ) : |
Lazy load related records | |
last ( ) : static | Go to the last row | |
next ( ) : static | boolean | Go to the next row | |
offsetExists ( integer $offset ) : boolean | Check whether an offset exists | |
offsetGet ( integer $offset ) : |
Retrieve a particular offset | |
offsetSet ( integer $offset, mixed $value ) | Set a particular offset | |
offsetUnset ( integer $offset ) | Unset a particular offset | |
prev ( ) : static | false | Go to the previous row | |
reset ( ) : static | Reset the model | |
row ( ) : array | Return the current row as associative array | |
save ( ) : static | Save the current model | |
setRow ( array $arrData ) : static | Set the current row from an array |
public __construct ( array $arrModels, string $strTable ) | ||
$arrModels | array | An array of models |
$strTable | string | The table name |
public static createFromDbResult ( |
||
$objResult | The database result object | |
$strTable | string | The table name |
Résultat | static | The model collection |
public current ( ) : |
||
Résultat | The model object |
public first ( ) : static | ||
Résultat | static | The model collection object |
public getIterator ( ) : ArrayIterator | ||
Résultat | ArrayIterator | The iterator object |
public getModels ( ) : |
||
Résultat | An array of models |
public getRelated ( string $strKey ) : |
||
$strKey | string | The property name |
Résultat | The model or a model collection if there are multiple rows |
public last ( ) : static | ||
Résultat | static | The model collection object |
public offsetExists ( integer $offset ) : boolean | ||
$offset | integer | The offset |
Résultat | boolean | True if the offset exists |
public offsetUnset ( integer $offset ) | ||
$offset | integer | The offset |
public prev ( ) : static | false | ||
Résultat | static | false | The model collection object or false if there is no previous row |
public reset ( ) : static | ||
Résultat | static | The model collection object |
public save ( ) : static | ||
Résultat | static | The model collection object |