Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ModelAttributesImportMappingAdapter Class Reference

Public Member Functions

 __construct (RedBeanModel $model)
 getAttributes ()

Protected Member Functions

 isAttributeAHasOneOwnedRelation ($attributeName)
 isAttributeAHasOneNotOwnedRelation ($attributeName)
 isAttributeAnOwnedCustomFieldRelation ($attributeName)
 isAttributeAnOwnedMultipleValuesCustomFieldRelation ($attributeName)
 isAttributeAHasOneOwnedRelationThatShouldBehaveAsNotOwnedRelation ($attributeName)

Static Protected Member Functions

static getRelationModelClassNamesToTreatAsNonOwnedRelations ()
static resolveAttributeImportTypeByAttributeName ($type, $attributeName)

Protected Attributes

 $model

Detailed Description

Adapter class to get attributes from a model as an array.

Definition at line 41 of file ModelAttributesImportMappingAdapter.php.


Constructor & Destructor Documentation

__construct ( RedBeanModel model  ) 
Parameters:
RedBeanModel $model

Definition at line 48 of file ModelAttributesImportMappingAdapter.php.


Member Function Documentation

getAttributes (  ) 

Returns HAS_ONE relation attributes and non-relation attributes in an array mapping attribute names to 'attributeLabel' to the attribute label. Also returns 'isRequired' and 'isAudited' information.

Definition at line 60 of file ModelAttributesImportMappingAdapter.php.

isAttributeAHasOneOwnedRelation ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
bool

Definition at line 123 of file ModelAttributesImportMappingAdapter.php.

isAttributeAHasOneNotOwnedRelation ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
bool

Definition at line 139 of file ModelAttributesImportMappingAdapter.php.

isAttributeAnOwnedCustomFieldRelation ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
bool

Definition at line 156 of file ModelAttributesImportMappingAdapter.php.

isAttributeAnOwnedMultipleValuesCustomFieldRelation ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
bool

Definition at line 173 of file ModelAttributesImportMappingAdapter.php.

isAttributeAHasOneOwnedRelationThatShouldBehaveAsNotOwnedRelation ( attributeName  )  [protected]

There are some HAS_ONE owned relations that should be treated as non owned relations.

Parameters:
string $attributeName
Returns:
true/false

Definition at line 191 of file ModelAttributesImportMappingAdapter.php.

static getRelationModelClassNamesToTreatAsNonOwnedRelations (  )  [static, protected]

CurrencyValue while usually owned and HAS_ONE, should be treated as a non-owned relation. This is because the rateToBase, currency, and value attributes of currencyValue will be handled as mappingRules for this attribute instead of individually selectable attributes to map to the import columns.

See also:
self::isAttributeAHasOneOwnedRelationThatShouldBehaveAsNotOwnedRelation();
Returns:
array

Definition at line 212 of file ModelAttributesImportMappingAdapter.php.

static resolveAttributeImportTypeByAttributeName ( type,
attributeName 
) [static, protected]

Resolves against special attributes. Some attributes, even though they have a 'type' that matches an existing generic attribute import rule, require their own attribute import rule. These attributes are not derived and this is why their attribute import type must be adjusted here. If the attribute was derived, then the derived attribute name becomes the type and this wouldn't be required.

Parameters:
string $type
string $attributeName

Definition at line 225 of file ModelAttributesImportMappingAdapter.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Mar 19 07:10:58 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8