Merge pull request #17305 from mlutfy/core1755
[civicrm-core.git] / CRM / Extension / Container / Interface.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * @package CRM
14 * @copyright CiviCRM LLC https://civicrm.org/licensing
15 */
16
17 /**
18 * An extension container is a locally-accessible source tree which can be
19 * scanned for extensions.
20 */
21 interface CRM_Extension_Container_Interface {
22
23 /**
24 * Determine if any unmet requirements prevent use of this container.
25 */
26 public function checkRequirements();
27
28 /**
29 * Get a list of extensions available in this container.
30 */
31 public function getKeys();
32
33 /**
34 * Determine the main .php file for an extension
35 *
36 * @param string $key
37 * Fully-qualified extension name.
38 */
39 public function getPath($key);
40
41 /**
42 * Determine the base URL for resources provided by the extension.
43 *
44 * @param string $key
45 * Fully-qualified extension name.
46 *
47 * @throws \CRM_Extension_Exception_MissingException
48 */
49 public function getResUrl($key);
50
51 /**
52 * Scan the container for available extensions.
53 */
54 public function refresh();
55
56 }