Back to SiteApplication class

Method __construct

public
__construct
(\Joomla\CMS\Input\Input $input = null, \Joomla\Registry\Registry $config = null, \Joomla\Application\Web\WebClient $client = null, \Joomla\DI\Container $container = null)
Class constructor.
Parameters
  • \Joomla\CMS\Input\Input $input An optional argument to provide dependency injection for the application's input object. If the argument is a JInput object that object will become the application's input object, otherwise a default input object is created.
  • \Joomla\Registry\Registry $config An optional argument to provide dependency injection for the application's config object. If the argument is a Registry object that object will become the application's config object, otherwise a default config object is created.
  • \Joomla\Application\Web\WebClient $client An optional argument to provide dependency injection for the application's client object. If the argument is a WebClient object that object will become the application's client object, otherwise a default client object is created.
  • \Joomla\DI\Container $container Dependency injection container.
Since
  • 3.2

Method __construct - Source code

/**
 * Class constructor.
 *
 * @param   Input      $input      An optional argument to provide dependency injection for the application's input
 *                                 object.  If the argument is a JInput object that object will become the
 *                                 application's input object, otherwise a default input object is created.
 * @param   Registry   $config     An optional argument to provide dependency injection for the application's config
 *                                 object.  If the argument is a Registry object that object will become the
 *                                 application's config object, otherwise a default config object is created.
 * @param   WebClient  $client     An optional argument to provide dependency injection for the application's client
 *                                 object.  If the argument is a WebClient object that object will become the
 *                                 application's client object, otherwise a default client object is created.
 * @param   Container  $container  Dependency injection container.
 *
 * @since   3.2
 */
public function __construct(Input $input = null, Registry $config = null, WebClient $client = null, Container $container = null)
{
    // Register the application name
    $this->name = 'site';
    // Register the client ID
    $this->clientId = 0;
    // Execute the parent constructor
    parent::__construct($input, $config, $client, $container);
}