[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Installer/ -> InstallerScriptInterface.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\Installer;
  11  
  12  // phpcs:disable PSR1.Files.SideEffects
  13  \defined('_JEXEC') or die;
  14  // phpcs:enable PSR1.Files.SideEffects
  15  
  16  /**
  17   * Base install script interface for use by extensions providing helper methods for common behaviours.
  18   *
  19   * @since  4.2.0
  20   */
  21  interface InstallerScriptInterface
  22  {
  23      /**
  24       * Function called after the extension is installed.
  25       *
  26       * @param   InstallerAdapter  $adapter  The adapter calling this method
  27       *
  28       * @return  boolean  True on success
  29       *
  30       * @since   4.2.0
  31       */
  32      public function install(InstallerAdapter $adapter): bool;
  33  
  34      /**
  35       * Function called after the extension is updated.
  36       *
  37       * @param   InstallerAdapter  $adapter  The adapter calling this method
  38       *
  39       * @return  boolean  True on success
  40       *
  41       * @since   4.2.0
  42       */
  43      public function update(InstallerAdapter $adapter): bool;
  44  
  45      /**
  46       * Function called after the extension is uninstalled.
  47       *
  48       * @param   InstallerAdapter  $adapter  The adapter calling this method
  49       *
  50       * @return  boolean  True on success
  51       *
  52       * @since   4.2.0
  53       */
  54      public function uninstall(InstallerAdapter $adapter): bool;
  55  
  56      /**
  57       * Function called before extension installation/update/removal procedure commences.
  58       *
  59       * @param   string            $type     The type of change (install or discover_install, update, uninstall)
  60       * @param   InstallerAdapter  $adapter  The adapter calling this method
  61       *
  62       * @return  boolean  True on success
  63       *
  64       * @since   4.2.0
  65       */
  66      public function preflight(string $type, InstallerAdapter $adapter): bool;
  67  
  68      /**
  69       * Function called after extension installation/update/removal procedure commences.
  70       *
  71       * @param   string            $type     The type of change (install or discover_install, update, uninstall)
  72       * @param   InstallerAdapter  $adapter  The adapter calling this method
  73       *
  74       * @return  boolean  True on success
  75       *
  76       * @since   4.2.0
  77       */
  78      public function postflight(string $type, InstallerAdapter $adapter): bool;
  79  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer