3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * @copyright CiviCRM LLC https://civicrm.org/licensing
18 * An extension container is a locally-accessible source tree which can be
19 * scanned for extensions.
21 class CRM_Extension_Container_Static
implements CRM_Extension_Container_Interface
{
25 * Array(string $key => array $spec) List of extensions.
27 public function __construct($exts) {
34 public function checkRequirements() {
41 public function getName() {
48 public function getKeys() {
49 return array_keys($this->exts
);
55 public function getPath($key) {
56 $e = $this->getExt($key);
63 public function getResUrl($key) {
64 $e = $this->getExt($key);
71 public function refresh() {
78 * @throws CRM_Extension_Exception_MissingException
80 protected function getExt($key) {
81 if (isset($this->exts
[$key])) {
82 return $this->exts
[$key];
85 throw new CRM_Extension_Exception_MissingException("Missing extension: $key");