array $spec) List of extensions. */ public function __construct($exts) { $this->exts = $exts; } /** * @inheritDoc */ public function checkRequirements() { return []; } /** * @inheritDoc */ public function getName() { return $this->name; } /** * @inheritDoc */ public function getKeys() { return array_keys($this->exts); } /** * @inheritDoc */ public function getPath($key) { $e = $this->getExt($key); return $e['path']; } /** * @inheritDoc */ public function getResUrl($key) { $e = $this->getExt($key); return $e['resUrl']; } /** * @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 { throw new CRM_Extension_Exception_MissingException("Missing extension: $key"); } } }