All Data Structures Functions Variables Pages
Static Public Member Functions
AttributeImportRulesFactory Class Reference

Static Public Member Functions

static makeByImportRulesTypeAndAttributeIndexOrDerivedType ($importRulesType, $attributeIndexOrDerivedType, $penultimateModelClassName=null, $explicitReadWriteModelPermissions=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,
  $explicitReadWriteModelPermissions = null 
)
static

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

Parameters
$importRulesType
string$attributeIndexOrDerivedType
null|| string $penultimateModelClassName
null|| ExplicitReadWriteModelPermissions $explicitReadWriteModelPermissions
Returns
object AttributeImportRules
Exceptions
NotSupportedException

Definition at line 59 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 111 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 134 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 155 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 190 of file AttributeImportRulesFactory.php.


The documentation for this class was generated from the following file:
Generated on Mon May 25 2020 07:10:39