Definition at line 28 of file hash.inc.
_createCombinations |
( |
|
$source | ) |
|
Given an array of elements of various depth, creates all possible combinations of the elements, preserving the index Given: $source = Array(1=>Array('a','b'), 2=>'c', 3=>Array('d')); $result = Array(Array(1=>'a',2=>'c',3=>'d'), Array(1=>'b',2=>'c',3=>'d'));
This function can be called statically returns Array(mixed) $state_hash The flattened state_hash
NOTE: Can only create combinations for arrays two levels deep
- Parameters
-
array | $source | The hash to flatten |
- Returns
- array private
Definition at line 309 of file hash.inc.
Internal function for setting the value of a hash field
- Parameters
-
string | $name | variable to modify |
mixed | $value | value that the variable will be set to |
- Returns
- void private
Definition at line 91 of file hash.inc.
Takes the hash, checks it for empty fields filling in the blanks where necessary, and creates all possible combinations of its elements
- Returns
- void public
Definition at line 251 of file hash.inc.
Allowed Hash Indices
event
assetid
asset_type
treeid
tree_propagate
triggerid
parentid
parent_type
childid
child_type
Constructor
Definition at line 61 of file hash.inc.
Provides a status of whether this hash object is empty or not
- Returns
- boolean public
Definition at line 75 of file hash.inc.
Sets the AssetID field
- Parameters
-
string | $assetid | the id of the asset |
- Returns
- void public
Definition at line 131 of file hash.inc.
setAssetType |
( |
|
$asset_type, |
|
|
|
$descendants = FALSE |
|
) |
| |
Sets the Asset Type field
- Parameters
-
string | $asset_type | the type of the asset |
boolean | $descendants | whether the hash will include the type's descendants, or just the passed asset type |
- Returns
- void public
Definition at line 147 of file hash.inc.
Sets the Event field
- Parameters
-
string | $event | the name of the event that was fired |
- Returns
- void public
Definition at line 116 of file hash.inc.
setLinkedId |
( |
|
$linked_id, |
|
|
|
$is_major |
|
) |
| |
Sets either the parent or child ID field of the Linked asset
- Parameters
-
string | $linked_id | the ID of the linked asset |
boolean | $is_major | whether the linked asset is a parent or a child |
- Returns
- void public
Definition at line 213 of file hash.inc.
setLinkedType |
( |
|
$linked_type, |
|
|
|
$is_major |
|
) |
| |
Sets either the parent or child Type field of the Linked asset
- Parameters
-
string | $linked_type | the type_code of the linked asset |
boolean | $is_major | whether the linked asset is a parent or a child |
- Returns
- void public
Definition at line 233 of file hash.inc.
setLinkTree |
( |
|
$tree_id, |
|
|
|
$propagation |
|
) |
| |
Sets the Asset Type field
- Parameters
-
string | $tree_id | the raw link tree id of the asset (see asset_manager::getAssetTreeids) |
string | $propagation | '01' or '00'. Determines whether the we are checking for assets underneath a tree node, or just for an individual asset |
- Returns
- void public
Definition at line 177 of file hash.inc.
setTriggerId |
( |
|
$trigger_id | ) |
|
Sets the Trigger ID field
- Parameters
-
string | $trigger_id | the ID of the trigger |
- Returns
- void public
Definition at line 197 of file hash.inc.
The documentation for this class was generated from the following file:
- /Users/webmaster/Desktop/squiz_matrix/core/assets/system/triggers/trigger_manager/hash.inc