CRM_Case_XMLRepository
in package
Tags
Table of Contents
Properties
- $hookCache : array<string|int, mixed>|null
- $unitTestCaseTypes : array<string|int, mixed>|null
- Override case types, only used by unit tests
- $xml : array<string|int, mixed>
- $singleton : mixed
Methods
- __construct() : mixed
- Class constructor.
- findXmlFile() : null|string
- Find xml file.
- flush() : mixed
- getActivityReferenceCount() : int
- Determine the number of times a particular activity-type is referenced in CiviCase XML.
- getAllCaseTypes() : array<string|int, string>
- getAllDeclaredActivityTypes() : array<string|int, string>
- getAllDeclaredRelationshipTypes() : array<string|int, string>
- Relationships are straight from XML, described from perspective of non-client
- getCaseTypesViaHook() : array<string|int, mixed>
- getRelationshipReferenceCount() : int
- Determine the number of times a particular activity-type is referenced in CiviCase XML.
- retrieve() : false|SimpleXMLElement
- Retrieve case.
- retrieveFile() : SimpleXMLElement|false
- Retrieve file.
- singleton() : CRM_Case_XMLRepository
Properties
$hookCache
protected
array<string|int, mixed>|null
$hookCache
= \NULL
$unitTestCaseTypes
Override case types, only used by unit tests
protected
array<string|int, mixed>|null
$unitTestCaseTypes
= \NULL
$xml
protected
array<string|int, mixed>
$xml
= []
<String,SimpleXMLElement>
$singleton
private
static mixed
$singleton
Methods
__construct()
Class constructor.
public
__construct([array<string|int, mixed> $unitTestCaseTypes = NULL ][, array<string|int, mixed> $xml = [] ]) : mixed
Parameters
- $unitTestCaseTypes : array<string|int, mixed> = NULL
- $xml : array<string|int, mixed> = []
findXmlFile()
Find xml file.
public
findXmlFile(string $caseType) : null|string
Parameters
- $caseType : string
Return values
null|string —file path
flush()
public
flush() : mixed
getActivityReferenceCount()
Determine the number of times a particular activity-type is referenced in CiviCase XML.
public
getActivityReferenceCount(string $activityType) : int
Parameters
- $activityType : string
-
Symbolic-name of an activity type.
Return values
intgetAllCaseTypes()
public
getAllCaseTypes() : array<string|int, string>
Return values
array<string|int, string> —symbolic names of case-types
getAllDeclaredActivityTypes()
public
getAllDeclaredActivityTypes() : array<string|int, string>
Return values
array<string|int, string> —symbolic-names of activity-types
getAllDeclaredRelationshipTypes()
Relationships are straight from XML, described from perspective of non-client
public
getAllDeclaredRelationshipTypes() : array<string|int, string>
Return values
array<string|int, string> —symbolic-names of relationship-types
getCaseTypesViaHook()
public
getCaseTypesViaHook() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getRelationshipReferenceCount()
Determine the number of times a particular activity-type is referenced in CiviCase XML.
public
getRelationshipReferenceCount(string $relationshipTypeName) : int
Parameters
- $relationshipTypeName : string
-
Symbolic-name of a relationship-type.
Return values
intretrieve()
Retrieve case.
public
retrieve(string $caseType) : false|SimpleXMLElement
Parameters
- $caseType : string
Tags
Return values
false|SimpleXMLElementretrieveFile()
Retrieve file.
public
retrieveFile(string $caseType) : SimpleXMLElement|false
Parameters
- $caseType : string
Return values
SimpleXMLElement|falsesingleton()
public
static singleton([bool $fresh = FALSE ]) : CRM_Case_XMLRepository
Parameters
- $fresh : bool = FALSE