class CRM_Extension_Container_Basic implements CRM_Extension_Container_Interface

An extension container is a locally-accessible source tree which can be scanned for extensions.

Properties

string $baseDir
string $baseUrl
CRM_Utils_Cache_Interface|NULL $cache
string $cacheKey
array($key $relPaths
array($key $relUrls

Methods

__construct(string $baseDir, string $baseUrl, $cache = NULL, string $cacheKey = NULL)

No description

checkRequirements()

No description

getKeys()

No description

getPath(string $key)

No description

getResUrl(string $key)

No description

refresh()

No description

string
getBaseDir()

No description

string
getRelPath(string $key)

Determine the relative path of an extension directory.

array
getRelPaths()

Scan $basedir for a list of extension-keys

string
getRelUrl(string $key)

Determine the relative path of an extension directory.

array
getRelUrls()

Scan $basedir for a list of extension-keys

static array
convertPathsToUrls(string $dirSep, array $relPaths)

Convert a list of relative paths to relative URLs.

Details

at line 95
__construct(string $baseDir, string $baseUrl, $cache = NULL, string $cacheKey = NULL)

Parameters

string $baseDir Local path to the container.
string $baseUrl Public URL of the container.
$cache Cache in which to store extension metadata.
string $cacheKey Unique name for this container.

at line 107
checkRequirements()

at line 131
getKeys()

at line 138
getPath(string $key)

Parameters

string $key Fully-qualified extension name.

at line 145
getResUrl(string $key)

Parameters

string $key Fully-qualified extension name.

at line 162
refresh()

at line 172
string getBaseDir()

Return Value

string

at line 185
protected string getRelPath(string $key)

Determine the relative path of an extension directory.

Parameters

string $key Extension name.

Return Value

string

Exceptions

CRM_Extension_Exception_MissingException

at line 199
protected array getRelPaths()

Scan $basedir for a list of extension-keys

Return Value

array ($key => $relPath)

at line 238
protected string getRelUrl(string $key)

Determine the relative path of an extension directory.

Parameters

string $key Extension name.

Return Value

string

Exceptions

CRM_Extension_Exception_MissingException

at line 252
protected array getRelUrls()

Scan $basedir for a list of extension-keys

Return Value

array ($key => $relUrl)

at line 274
static array convertPathsToUrls(string $dirSep, array $relPaths)

Convert a list of relative paths to relative URLs.

Note: Treat as private. This is only public to facilitate testing.

Parameters

string $dirSep Directory separator ("/" or "\").
array $relPaths Array($key => $relPath).

Return Value

array Array($key => $relUrl).