X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FExtension%2FContainer%2FStatic.php;h=f462fde7917f83b9ea7c4a5173f1381394fdc519;hb=82e7a8b8a4054c4814900ddf5e8fc56d6819c134;hp=4aa227759014b948252238d7c2569d23875e7240;hpb=06b69b1899b6304f7832f6d4d2f5af4a0acfde8c;p=civicrm-core.git diff --git a/CRM/Extension/Container/Static.php b/CRM/Extension/Container/Static.php index 4aa2277590..f462fde791 100644 --- a/CRM/Extension/Container/Static.php +++ b/CRM/Extension/Container/Static.php @@ -1,7 +1,7 @@ array $spec) List of extensions. + */ public function __construct($exts) { $this->exts = $exts; } /** - * {@inheritdoc} + * @inheritDoc */ public function checkRequirements() { return array(); } /** - * {@inheritdoc} + * @inheritDoc */ public function getName() { return $this->name; } /** - * {@inheritdoc} + * @inheritDoc */ public function getKeys() { return array_keys($this->exts); } /** - * {@inheritdoc} + * @inheritDoc */ public function getPath($key) { $e = $this->getExt($key); @@ -70,7 +74,7 @@ class CRM_Extension_Container_Static implements CRM_Extension_Container_Interfac } /** - * {@inheritdoc} + * @inheritDoc */ public function getResUrl($key) { $e = $this->getExt($key); @@ -78,16 +82,24 @@ class CRM_Extension_Container_Static implements CRM_Extension_Container_Interfac } /** - * {@inheritdoc} + * @inheritDoc */ public function refresh() { } + /** + * @param string $key + * Extension name. + * + * @throws CRM_Extension_Exception_MissingException + */ protected function getExt($key) { if (isset($this->exts[$key])) { return $this->exts[$key]; - } else { + } + else { throw new CRM_Extension_Exception_MissingException("Missing extension: $key"); } } + }