Import from SVN (r45945, r596)
[civicrm-core.git] / CRM / Extension / Manager / Interface.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.3 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26*/
27
28/**
29 * The extension manager handles installing, disabling enabling, and
30 * uninstalling extensions.
31 *
32 * @package CRM
33 * @copyright CiviCRM LLC (c) 2004-2013
34 * $Id$
35 *
36 */
37interface CRM_Extension_Manager_Interface {
38 public function onPreInstall(CRM_Extension_Info $info);
39 public function onPostInstall(CRM_Extension_Info $info);
40
41 public function onPreEnable(CRM_Extension_Info $info);
42 public function onPostEnable(CRM_Extension_Info $info);
43
44 /**
45 * Perform type-specific removal logic (before updating the extension
46 * row in the "civicrm_extension" table).
47 *
48 * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy)
49 * @see CRM_Extension_Manager::createInfoFromDB
50 */
51 public function onPreDisable(CRM_Extension_Info $info);
52
53 /**
54 * Perform type-specific removal logic (after updating the extension
55 * row in the "civicrm_extension" table).
56 *
57 * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy)
58 * @see CRM_Extension_Manager::createInfoFromDB
59 */
60 public function onPostDisable(CRM_Extension_Info $info);
61
62 /**
63 * Perform type-specific removal logic (before removing the extension
64 * row in the "civicrm_extension" table).
65 *
66 * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy)
67 * @see CRM_Extension_Manager::createInfoFromDB
68 */
69 public function onPreUninstall(CRM_Extension_Info $info);
70
71 /**
72 * Perform type-specific removal logic (after removing the extension
73 * row in the "civicrm_extension" table).
74 *
75 * @param CRM_Extension_Info $info may be generated from xml or DB (which is lossy)
76 * @see CRM_Extension_Manager::createInfoFromDB
77 */
78 public function onPostUninstall(CRM_Extension_Info $info);
79
80 public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
81 public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
82}