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