SearchDataProviderMetadataAdapter Class Reference

Inheritance diagram for SearchDataProviderMetadataAdapter:
DataProviderMetadataAdapter ArchivedEmailMatchingSearchDataProviderMetadataAdapter ConversationsSearchDataProviderMetadataAdapter MarketingListsMembersSearchDataProviderMetadataAdapter MarketingListsSearchDataProviderMetadataAdapter MissionsSearchDataProviderMetadataAdapter

Public Member Functions

 __construct ($model, $userId, $metadata)
 getAdaptedMetadata ($appendStructureAsAnd=true, $clauseCount=1)

Static Public Member Functions

static resolveAsRedBeanModel ($model)

Protected Member Functions

 populateClausesAndStructureForAttributeWithRelatedModelData ($model, $relatedMetaData, $adaptedMetadataClauseBasePart, &$adaptedMetadataClauses, &$clauseCount, &$structure, $depth, $operatorType=null)
 populateClausesAndStructureForAttribute ($model, $attributeName, $value, &$adaptedMetadataClauses, &$clauseCount, &$structure, $adaptedMetadataClauseBasePart=array(), $operatorType=null, $depth=0)
 resolveOperatorAndCastsAndAppendClauseAsAndToStructureString ($model, $attributeName, $operatorType, $value, &$adaptedMetadataClause, &$secondAdaptedMetadataClause, &$structure, &$clauseCount, $previousAttributeName=null)
 resolveAppendClauseAsAndToStructureString (&$structure, &$clauseCount)
 populateClausesAndStructureForConcatedAttributes ($model, $attributeNames, $value, &$adaptedMetadataClauseBasePart, &$clauseCount, &$structure, $operatorType=null)
 populateAdaptedMetadataFromSearchFormAttributes ($model, $attributeName, $value, &$adaptedMetadataClauses, &$clauseCount, &$structure, $adaptedMetadataClauseBasePart=array(), $depth=0)
 isBooleanNullOrEmptyOperation ($mixedType, $operatorType, $value)

Static Protected Member Functions

static resolveRelatedValueWhenArray ($model, $relatedAttributeName, &$relatedValue, &$operatorType)
static appendClauseAsAndToStructureString (&$structure, $clause)
static appendClauseAsOrToStructureString (&$structure, $clause)
static resolveBooleanFalseValueAndOperatorTypeForAdaptedMetadataClause ($type, &$value, &$operatorType)
static getAdaptedMetadataClauseBasePartAtRequiredDepth ($adaptedMetadataClauseBasePart, $depth)
static getAppendedAdaptedMetadataClauseBasePart ($adaptedMetadataClauseBasePart, $partToAppend, $depth)

Protected Attributes

 $appendStructureAsAnd

Detailed Description

Adapter class to manipulate searchAttribute information into DataProvider metadata. Takes either a RedBeanModel or a SearchForm model.

Definition at line 41 of file SearchDataProviderMetadataAdapter.php.


Constructor & Destructor Documentation

__construct ( model,
userId,
metadata 
)

Override to make sure the model is a RedBeanModel or a SearchForm model.

Reimplemented from DataProviderMetadataAdapter.

Reimplemented in ArchivedEmailMatchingSearchDataProviderMetadataAdapter.

Definition at line 48 of file SearchDataProviderMetadataAdapter.php.


Member Function Documentation

getAdaptedMetadata ( appendStructureAsAnd = true,
clauseCount = 1 
)

Convert metadata which is just an array of posted searchAttributes into metadata that is readable by the RedBeanModelDataProvider

Parameters:
$appendStructureAsAnd - true/false. If false, then the structure will be appended as OR.

Definition at line 60 of file SearchDataProviderMetadataAdapter.php.

populateClausesAndStructureForConcatedAttributes ( model,
attributeNames,
value,
&$  adaptedMetadataClauseBasePart,
&$  clauseCount,
&$  structure,
operatorType = null 
) [protected]

Method for populating clauses for concated attributes. The first concated attribute $attributeNames[0] will be used to determine the operator types.

Definition at line 481 of file SearchDataProviderMetadataAdapter.php.

isBooleanNullOrEmptyOperation ( mixedType,
operatorType,
value 
) [protected]
Parameters:
$mixedType 
$operatorType 
$value 
Returns:
bool true if boolean operator is equals and the value is false or 0. This means we we are looking for when the boolean value is NULL or 0

Definition at line 665 of file SearchDataProviderMetadataAdapter.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat May 27 07:10:29 2017