RedBeanManyToManyRelatedModels Class Reference

Inheritance diagram for RedBeanManyToManyRelatedModels:
RedBeanMutableRelatedModels RedBeanModels

Public Member Functions

 __construct (RedBean_OODBBean $bean, $modelClassName, $linkType, $linkName=null)
 getModelClassName ()
 getErrors ($attributeNameOrNames=null)
 validate (array $attributeNames=null)
 save ($runValidation=true)
 getTableName (RedBean_OODBBean $bean=null)

Static Public Member Functions

static getTableNameByModelClassNames ($modelClassName, $anotherModelClassName, $linkName=null)

Static Protected Member Functions

static resolveTableNamesWithLinkName (array $tableNames, $linkName=null)

Protected Attributes

 $inside = false
 $linkName

Detailed Description

Relates models as RedBean associations, so that the relationship is M:N via a join table.

Definition at line 44 of file RedBeanManyToManyRelatedModels.php.


Constructor & Destructor Documentation

__construct ( RedBean_OODBBean $  bean,
modelClassName,
linkType,
linkName = null 
)

Constructs a new RedBeanModels which is a collection of classes extending model. The models are created lazily. Models are only constructed with beans by the model. Beans are never used by the application directly.

Definition at line 56 of file RedBeanManyToManyRelatedModels.php.


Member Function Documentation

getErrors ( attributeNameOrNames = null  ) 

Returns the errors for the related models.

Parameters:
$attributeNameOrNames See RedNeamModel::getErrors().

Reimplemented from RedBeanMutableRelatedModels.

Definition at line 84 of file RedBeanManyToManyRelatedModels.php.

validate ( array $  attributeNames = null  ) 

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

Reimplemented from RedBeanModels.

Definition at line 99 of file RedBeanManyToManyRelatedModels.php.

save ( runValidation = true  ) 

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

Reimplemented from RedBeanMutableRelatedModels.

Definition at line 105 of file RedBeanManyToManyRelatedModels.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jul 22 07:10:28 2017