Documentation

CRM_Upgrade_DispatchPolicy
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Methods

assertActive()  : mixed
Assert that a specific policy is currently active.
get()  : array<string|int, mixed>
Read the dispatch policy.
onRunTask()  : mixed
Before running upgrade tasks, ensure that we apply the current dispatch-policy.
pick()  : array<string|int, mixed>
Determine the dispatch policy
useTemporarily()  : CRM_Utils_AutoClean
Create an auto-clean object which temporarily applies the preferred policy.

Methods

assertActive()

Assert that a specific policy is currently active.

public static assertActive(string $name) : mixed
Parameters
$name : string

Ex: 'upgrade.main' or 'upgrade.finish'

Tags
throws
RuntimeException

useTemporarily()

Create an auto-clean object which temporarily applies the preferred policy.

public static useTemporarily(string $name) : CRM_Utils_AutoClean
Parameters
$name : string
Tags
code

$cleanup = CRM_Upgrade_DispatchPolicy::useTemporarily('upgrade.finish'); doStuff(); unset($cleanup);

endCode
Return values
CRM_Utils_AutoClean

        
On this page

Search results