[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Application/ -> BaseApplication.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2012 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\Application;
  11  
  12  use Joomla\Application\AbstractApplication;
  13  use Joomla\CMS\Input\Input;
  14  use Joomla\Event\DispatcherAwareInterface;
  15  use Joomla\Event\DispatcherAwareTrait;
  16  use Joomla\Registry\Registry;
  17  
  18  // phpcs:disable PSR1.Files.SideEffects
  19  \defined('JPATH_PLATFORM') or die;
  20  // phpcs:enable PSR1.Files.SideEffects
  21  
  22  /**
  23   * Joomla Platform Base Application Class
  24   *
  25   * @property-read  Input  $input  The application input object
  26   *
  27   * @since       3.0.0
  28   * @deprecated  5.0  Application classes should be based on \Joomla\Application\AbstractApplication
  29   */
  30  abstract class BaseApplication extends AbstractApplication implements DispatcherAwareInterface
  31  {
  32      use DispatcherAwareTrait;
  33      use EventAware;
  34      use IdentityAware;
  35  
  36      /**
  37       * Class constructor.
  38       *
  39       * @param   Input     $input   An optional argument to provide dependency injection for the application's
  40       *                             input object.  If the argument is a \JInput object that object will become
  41       *                             the application's input object, otherwise a default input object is created.
  42       * @param   Registry  $config  An optional argument to provide dependency injection for the application's
  43       *                             config object.  If the argument is a Registry object that object will become
  44       *                             the application's config object, otherwise a default config object is created.
  45       *
  46       * @since   3.0.0
  47       */
  48      public function __construct(Input $input = null, Registry $config = null)
  49      {
  50          $this->input = $input instanceof Input ? $input : new Input();
  51          $this->config = $config instanceof Registry ? $config : new Registry();
  52  
  53          $this->initialise();
  54      }
  55  }


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