当前位置: 首页>>代码示例>>PHP>>正文


PHP JApplicationCms::__construct方法代码示例

本文整理汇总了PHP中JApplicationCms::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplicationCms::__construct方法的具体用法?PHP JApplicationCms::__construct怎么用?PHP JApplicationCms::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JApplicationCms的用法示例。


在下文中一共展示了JApplicationCms::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Class constructor.
  *
  * @since   3.1
  */
 public function __construct()
 {
     // Run the parent constructor
     parent::__construct();
     // Load and set the dispatcher
     $this->loadDispatcher();
     // Enable sessions by default.
     if (is_null($this->config->get('session'))) {
         $this->config->set('session', true);
     }
     // Set the session default name.
     if (is_null($this->config->get('session_name'))) {
         $this->config->set('session_name', 'installation');
     }
     // Create the session if a session name is passed.
     if ($this->config->get('session') !== false) {
         $this->loadSession();
         // Register the session with JFactory
         JFactory::$session = $this->getSession();
     }
     // Store the debug value to config based on the JDEBUG flag
     $this->config->set('debug', JDEBUG);
     // Register the config to JFactory
     JFactory::$config = $this->config;
     // Register the application to JFactory
     JFactory::$application = $this;
     // Register the application name
     $this->_name = 'installation';
     // Register the client ID
     $this->_clientId = 2;
     // Set the root in the URI one level up.
     $parts = explode('/', JUri::base(true));
     array_pop($parts);
     JUri::root(null, implode('/', $parts));
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:40,代码来源:web.php

示例2: __construct

 /**
  * Class constructor.
  *
  * @param   JInput                 $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   JApplicationWebClient  $client  An optional argument to provide dependency injection for the application's
  *                                          client object.  If the argument is a JApplicationWebClient object that object will become
  *                                          the application's client object, otherwise a default client object is created.
  *
  * @since   3.2
  */
 public function __construct(JInput $input = null, Registry $config = null, JApplicationWebClient $client = null)
 {
     // Register the application name
     $this->_name = 'site';
     // Register the client ID
     $this->_clientId = 0;
     // Execute the parent constructor
     parent::__construct($input, $config, $client);
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:24,代码来源:site.php

示例3: __construct

 /**
  * Class constructor.
  *
  * @param   mixed  $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   mixed  $config  An optional argument to provide dependency injection for the application's
  *                          config object.  If the argument is a JRegistry object that object will become
  *                          the application's config object, otherwise a default config object is created.
  * @param   mixed  $client  An optional argument to provide dependency injection for the application's
  *                          client object.  If the argument is a JApplicationWebClient object that object will become
  *                          the application's client object, otherwise a default client object is created.
  *
  * @since   3.2
  */
 public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null)
 {
     // Register the application name
     $this->_name = 'administrator';
     // Register the client ID
     $this->_clientId = 1;
     // Execute the parent constructor
     parent::__construct($input, $config, $client);
     // Set the root in the URI based on the application name
     JUri::root(null, str_ireplace('/' . $this->getName(), '', JUri::base(true)));
 }
开发者ID:sural98,项目名称:joomla-cms,代码行数:26,代码来源:administrator.php

示例4: __construct

 /**
  * Class constructor.
  *
  * @param   JInput                 $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   JApplicationWebClient  $client  An optional argument to provide dependency injection for the application's
  *                                          client object.  If the argument is a JApplicationWebClient object that object will become
  *                                          the application's client object, otherwise a default client object is created.
  *
  * @since   3.2
  */
 public function __construct(JInput $input = null, Registry $config = null, JApplicationWebClient $client = null)
 {
     // Register the application name
     $this->_name = 'administrator';
     // Register the client ID
     $this->_clientId = 1;
     // Execute the parent constructor
     parent::__construct($input, $config, $client);
     // Set the root in the URI based on the application name
     JUri::root(null, rtrim(dirname(JUri::base(true)), '/\\'));
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:26,代码来源:administrator.php

示例5: __construct

 /**
  * Class constructor.
  *
  * @param   mixed  $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   mixed  $config  An optional argument to provide dependency injection for the application's
  *                          config object.  If the argument is a JRegistry object that object will become
  *                          the application's config object, otherwise a default config object is created.
  * @param   mixed  $client  An optional argument to provide dependency injection for the application's
  *                          client object.  If the argument is a JApplicationWebClient object that object will become
  *                          the application's client object, otherwise a default client object is created.
  *
  * @since   3.2
  */
 public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null)
 {
     // Register the application name
     $this->_name = 'site';
     // Register the client ID
     $this->_clientId = 0;
     // Execute the parent constructor
     parent::__construct($input, $config, $client);
     // Create the session if a session name was passed.
     if ($this->config->get('session') !== false) {
         $this->loadSession(null, $this->config->get('session_autostart'));
     }
 }
开发者ID:terryvisser,项目名称:joomlatools-platform,代码行数:28,代码来源:site.php

示例6: __construct

 /**
  * Class constructor.
  *
  * @param   mixed  $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   mixed  $config  An optional argument to provide dependency injection for the application's
  *                          config object.  If the argument is a JRegistry object that object will become
  *                          the application's config object, otherwise a default config object is created.
  * @param   mixed  $client  An optional argument to provide dependency injection for the application's
  *                          client object.  If the argument is a JApplicationWebClient object that object will become
  *                          the application's client object, otherwise a default client object is created.
  *
  * @since   3.2
  */
 public function __construct(JInput $input = null, JRegistry $config = null, JApplicationWebClient $client = null)
 {
     // Register the application name
     $this->_name = 'administrator';
     // Register the client ID
     $this->_clientId = 1;
     // Execute the parent constructor
     parent::__construct($input, $config, $client);
     // Set the root in the URI based on the application name
     JUri::root(null, str_ireplace('/' . $this->getName(), '', JUri::base(true)));
     // Create the session if a session name was passed.
     if ($this->config->get('session') !== false) {
         $this->loadSession();
     }
 }
开发者ID:terryvisser,项目名称:joomlatools-platform,代码行数:30,代码来源:administrator.php

示例7: __construct

 /**
  * Class constructor.
  *
  * @param   JInput                 $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   JApplicationWebClient  $client     An optional argument to provide dependency injection for the application's
  *                                             client object.  If the argument is a JApplicationWebClient 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.1
  */
 public function __construct(JInput $input = null, Registry $config = null, JApplicationWebClient $client = null, Container $container = null)
 {
     // Register the application name.
     $this->name = 'installation';
     // Register the client ID.
     $this->clientId = 2;
     // Run the parent constructor.
     parent::__construct($input, $config, $client, $container);
     // Store the debug value to config based on the JDEBUG flag.
     $this->config->set('debug', JDEBUG);
     // Register the config to JFactory.
     JFactory::$config = $this->config;
     // Set the root in the URI one level up.
     $parts = explode('/', JUri::base(true));
     array_pop($parts);
     JUri::root(null, implode('/', $parts));
 }
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:33,代码来源:web.php

示例8: __construct

 /**
  * Class constructor.
  *
  * @since   3.1
  */
 public function __construct()
 {
     // Register the application name.
     $this->_name = 'installation';
     // Register the client ID.
     $this->_clientId = 2;
     // Run the parent constructor.
     parent::__construct();
     // Store the debug value to config based on the JDEBUG flag.
     $this->config->set('debug', JDEBUG);
     // Register the config to JFactory.
     JFactory::$config = $this->config;
     // Register the application to JFactory.
     JFactory::$application = $this;
     // Set the root in the URI one level up.
     $parts = explode('/', JUri::base(true));
     array_pop($parts);
     JUri::root(null, implode('/', $parts));
 }
开发者ID:ITPrism,项目名称:CrowdfundingDistribution,代码行数:24,代码来源:web.php

示例9: __construct

 /**
  * Constructor
  */
 public function __construct(\JInput $input = null, Registry $config = null, \JApplicationWebClient $client = null)
 {
     parent::__construct($input, $config, $client);
     $this->userState = new \JRegistry();
 }
开发者ID:Biromain,项目名称:windwalker-joomla-rad,代码行数:8,代码来源:TestApplication.php


注:本文中的JApplicationCms::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。