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.

Reimplemented in RedBeanMutableRelatedModels.

Definition at line 164 of file RedBeanModels.php.

getByIndex ( i  )  [protected]

Returns a model by index. Used by Iterator.

Parameters:
$i An 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.

Reimplemented in RedBeanManyToManyRelatedModels.

Definition at line 221 of file RedBeanModels.php.

save ( runValidation = true  ) 

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

Reimplemented in RedBeanManyToManyRelatedModels, RedBeanMutableRelatedModels, and RedBeanOneToManyRelatedModels.

Definition at line 242 of file RedBeanModels.php.

isModified (  ) 

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

Reimplemented in RedBeanMutableRelatedModels.

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:
 All Data Structures Functions Variables
Generated on Sat Mar 25 07:10:29 2017