Documentation

CRM_Utils_VersionCheck
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Constants

CACHEFILE_EXPIRE  = 259200
CACHEFILE_NAME  = 'version-msgs-cache.json'

Properties

$cacheFile  : string
Path to cache file
$cronJob  : array<string|int, mixed>
$isInfoAvailable  : bool
$localVersion  : string
The version of the current (local) installation
$pingbackUrl  : string
$versionInfo  : array<string|int, mixed>
Info about available versions
$stats  : array<string|int, mixed>
Pingback params

Methods

__construct()  : mixed
Class constructor.
fetch()  : mixed
Called by version_check cron job
flushCache()  : mixed
Removes cached version info.
getVersionMessages()  : array<string|int, mixed>|null
initialize()  : mixed
Self-populates version info
setVersionInfo()  : mixed
Sets $versionInfo
getDomainStats()  : mixed
Fetch stats about domain and add to 'stats' array.
getEntityStats()  : mixed
Fetch counts from entity tables.
getExtensionStats()  : mixed
Fetch stats about enabled components/extensions Add info to the 'extensions' array
getJob()  : mixed
Lookup version_check scheduled job
getPayProcStats()  : mixed
Get active payment processor types.
getSiteStats()  : mixed
Collect info about the site to be sent as pingback data.
pingBack()  : mixed
Send the request to civicrm.org Store results in the cache file
readCacheFile()  : bool
writeCacheFile()  : mixed
Save version info to file.

Constants

CACHEFILE_NAME

public mixed CACHEFILE_NAME = 'version-msgs-cache.json'

Properties

$localVersion

The version of the current (local) installation

public string $localVersion = \NULL

$pingbackUrl

public string $pingbackUrl = 'https://latest.civicrm.org/stable.php?format=summary'

$versionInfo

Info about available versions

public array<string|int, mixed> $versionInfo = []

$stats

Pingback params

protected array<string|int, mixed> $stats = []

Methods

__construct()

Class constructor.

public __construct() : mixed

fetch()

Called by version_check cron job

public fetch() : mixed

flushCache()

Removes cached version info.

public flushCache() : mixed

getVersionMessages()

public getVersionMessages() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

message: string title: string severity: string Ex: 'info', 'notice', 'warning', 'critical'.

initialize()

Self-populates version info

public initialize([bool $force = FALSE ]) : mixed
Parameters
$force : bool = FALSE
Tags
throws
Exception

setVersionInfo()

Sets $versionInfo

protected setVersionInfo(mixed $info) : mixed
Parameters
$info : mixed

getDomainStats()

Fetch stats about domain and add to 'stats' array.

private getDomainStats() : mixed

getEntityStats()

Fetch counts from entity tables.

private getEntityStats() : mixed

Add info to the 'entities' array

getExtensionStats()

Fetch stats about enabled components/extensions Add info to the 'extensions' array

private getExtensionStats() : mixed

getJob()

Lookup version_check scheduled job

private getJob() : mixed

getPayProcStats()

Get active payment processor types.

private getPayProcStats() : mixed

getSiteStats()

Collect info about the site to be sent as pingback data.

private getSiteStats() : mixed

pingBack()

Send the request to civicrm.org Store results in the cache file

private pingBack() : mixed

readCacheFile()

private readCacheFile() : bool
Return values
bool

writeCacheFile()

Save version info to file.

private writeCacheFile(string $contents) : mixed
Parameters
$contents : string
Tags
throws
Exception

        
On this page

Search results