AttributeImportRulesFactory Class Reference

Static Public Member Functions

static makeByImportRulesTypeAndAttributeIndexOrDerivedType ($importRulesType, $attributeIndexOrDerivedType, $penultimateModelClassName=null)
static makeCollection ($importRulesType, $attributeIndicesOrDerivedTypes)
static getClassNameByImportRulesTypeAndAttributeIndexOrDerivedType ($importRulesType, $attributeIndexOrDerivedType)
static resolveModelClassNameAndAttributeNameByAttributeIndexOrDerivedType (&$modelClassName, $attributeIndexOrDerivedType)
static getAttributeNameFromAttributeNameByAttributeIndexOrDerivedType ($attributeIndexOrDerivedType)

Detailed Description

Helper class to make AttributeImportRules objects and collections.

Definition at line 40 of file AttributeImportRulesFactory.php.


Member Function Documentation

static makeByImportRulesTypeAndAttributeIndexOrDerivedType ( importRulesType,
attributeIndexOrDerivedType,
penultimateModelClassName = null 
) [static]

Given an import rules type and an attribute index or derived type string, make an AttributeImportRules object.

Parameters:
string $importRulesType
string $attributeIndexOrDerivedType
string $penultimateModelClassName
Returns:
object AttributeImportRules

Definition at line 57 of file AttributeImportRulesFactory.php.

static makeCollection ( importRulesType,
attributeIndicesOrDerivedTypes 
) [static]

Given an import rules type and an array of atttribute indices or derived types, make a collection of AttributeImportRules.

Parameters:
string $importRulesType
array $attributeIndicesOrDerivedTypes
Returns:
array AttributeImportRules collection

Definition at line 107 of file AttributeImportRulesFactory.php.

static getClassNameByImportRulesTypeAndAttributeIndexOrDerivedType ( importRulesType,
attributeIndexOrDerivedType 
) [static]

Given an import rules type and attribute index or derived type, return the attribute import rules class name.

Parameters:
string $importRulesType
string $attributeIndexOrDerivedType
Returns:
string $attributeImportRulesClassName

Definition at line 130 of file AttributeImportRulesFactory.php.

static resolveModelClassNameAndAttributeNameByAttributeIndexOrDerivedType ( &$  modelClassName,
attributeIndexOrDerivedType 
) [static]

This method will inspect the attributeIndexOrDerivedType looking for any attribute indexes that represent two distinct variables. If it finds this, then it gets the correct attributeName to return. The two variables would be a relation attributeName and a relatedAttributeName. It will return the relatedAttributeName and update by reference the $modelClassName to the relation model class name.

Parameters:
string $modelClassName
string $attributeIndexOrDerivedType

Definition at line 151 of file AttributeImportRulesFactory.php.

static getAttributeNameFromAttributeNameByAttributeIndexOrDerivedType ( attributeIndexOrDerivedType  )  [static]

Given an attribute index or derived type, get the actual attribute name. If the value is not split by FormModelUtil::DELIMITER then the value passed in will be returned as is. Otherwise the left side of the delimiter will be returned.

Parameters:
string $attributeIndexOrDerivedType

Definition at line 186 of file AttributeImportRulesFactory.php.


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