All Data Structures Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes
RedBeanModels Class Reference
Inheritance diagram for RedBeanModels:
RedBeanMutableRelatedModels RedBeanManyToManyRelatedModels RedBeanOneToManyRelatedModels

Public Member Functions

 __toString ()
 
 offsetSet ($i, $value)
 
 offsetExists ($i)
 
 offsetUnset ($i)
 
 offsetGet ($i)
 
 rewind ()
 
 current ()
 
 key ()
 
 next ()
 
 valid ()
 
 count ()
 
 contains (RedBeanModel $model)
 
 hasErrors ($attributeNameOrNames)
 
 validate (array $attributeNames=null)
 
 save ($runValidation=true)
 
 isModified ()
 

Protected Member Functions

 getByIndex ($i)
 

Protected Attributes

 $modelClassName
 
 $bean
 
 $relatedBeansAndModels = array()
 

Detailed Description

Contains all of the models of a particular type, or a selection of models of a particular type using a where clause, or all of the models of a particular type associated with a bean in a one to many relationship.

Definition at line 46 of file RedBeanModels.php.

Member Function Documentation

__toString ( )

Returns the displayable string for the collection.

Returns
A string.

Definition at line 68 of file RedBeanModels.php.

offsetSet (   $i,
  $value 
)

Implements ArrayAccess::offsetSet(). See the php documentation.

Definition at line 76 of file RedBeanModels.php.

offsetExists (   $i)

Implements ArrayAccess::offsetExists(). See the php documentation.

Definition at line 84 of file RedBeanModels.php.

offsetUnset (   $i)

Implements ArrayAccess::offsetUnset(). See the php documentation.

Definition at line 92 of file RedBeanModels.php.

offsetGet (   $i)

Implements ArrayAccess::offsetGet(). See the php documentation.

Definition at line 100 of file RedBeanModels.php.

rewind ( )

Implements Iterator::rewind(). See the php documentation.

Definition at line 115 of file RedBeanModels.php.

current ( )

Implements Iterator::current(). See the php documentation.

Definition at line 123 of file RedBeanModels.php.

key ( )

Implements Iterator::key(). See the php documentation.

Definition at line 131 of file RedBeanModels.php.

next ( )

Implements Iterator::next(). See the php documentation.

Definition at line 139 of file RedBeanModels.php.

valid ( )

Implements Iterator::valid(). See the php documentation.

Definition at line 147 of file RedBeanModels.php.

count ( )

Returns the count of models in the collection. Implements Countable::count().

Definition at line 156 of file RedBeanModels.php.

contains ( RedBeanModel  $model)

Returns whether the given model is already in the collection.

Definition at line 164 of file RedBeanModels.php.

getByIndex (   $i)
protected

Returns a model by index. Used by Iterator.

Parameters
$iAn integer index >= 0 and < count().

Definition at line 180 of file RedBeanModels.php.

hasErrors (   $attributeNameOrNames)

Returns true if any of the models in the collection have errors.

Definition at line 198 of file RedBeanModels.php.

validate ( array  $attributeNames = null)

Validates all of the models in the collection that have been lazily retrieved.

Definition at line 221 of file RedBeanModels.php.

save (   $runValidation = true)

Saves all of the models in the collection that have been lazily retrieved.

Definition at line 242 of file RedBeanModels.php.

isModified ( )

Returns true if any of the models in the collection have been modified.

Definition at line 261 of file RedBeanModels.php.

Field Documentation

$bean
protected

The bean for the model to which these related models are related.

Definition at line 53 of file RedBeanModels.php.

$relatedBeansAndModels = array()
protected

Contains the related beans, until the related model has been retrieved, at which point it contains the model. The bean for that model can then be retrieved with getPrimaryBean().

Definition at line 60 of file RedBeanModels.php.


The documentation for this class was generated from the following file:
Generated on Fri Feb 28 2020 07:10:58