[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/application/src/Event/ -> ApplicationEvent.php (source)

   1  <?php
   2  /**
   3   * Part of the Joomla Framework Application Package
   4   *
   5   * @copyright  Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
   6   * @license    GNU General Public License version 2 or later; see LICENSE
   7   */
   8  
   9  namespace Joomla\Application\Event;
  10  
  11  use Joomla\Application\AbstractApplication;
  12  use Joomla\Event\Event;
  13  
  14  /**
  15   * Base event class for application events.
  16   *
  17   * @since  2.0.0
  18   */
  19  class ApplicationEvent extends Event
  20  {
  21      /**
  22       * The active application.
  23       *
  24       * @var    AbstractApplication
  25       * @since  2.0.0
  26       */
  27      private $application;
  28  
  29      /**
  30       * Event constructor.
  31       *
  32       * @param   string               $name         The event name.
  33       * @param   AbstractApplication  $application  The active application.
  34       *
  35       * @since   2.0.0
  36       */
  37  	public function __construct(string $name, AbstractApplication $application)
  38      {
  39          parent::__construct($name);
  40  
  41          $this->application = $application;
  42      }
  43  
  44      /**
  45       * Get the active application.
  46       *
  47       * @return  AbstractApplication
  48       *
  49       * @since   2.0.0
  50       */
  51  	public function getApplication(): AbstractApplication
  52      {
  53          return $this->application;
  54      }
  55  }


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