本文整理汇总了PHP中JApplication::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplication::__construct方法的具体用法?PHP JApplication::__construct怎么用?PHP JApplication::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JApplication
的用法示例。
在下文中一共展示了JApplication::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Class constructor
*
* @access protected
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
function __construct($config = array())
{
$config['clientId'] = 1;
parent::__construct($config);
//Set the root in the URI based on the application name
JURI::root(null, str_replace('/' . $this->getName(), '', JURI::base(true)));
}
示例2: array
/**
* Class constructor
*
* @access protected
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
function __construct($config = array())
{
$config['clientId'] = 0;
$config['multisite'] = true;
parent::__construct($config);
}
示例3: __construct
/**
* Class constructor
*
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
public function __construct($config = array())
{
$config['clientId'] = 0;
\Event::listen(function ($event) {
// This must be done before the session is read, otherwise it will overwrite
// the existing session with a guest non-https session prior to redirecting to https
// NOTE: we're including a cli check here because the console currently uses the 'site'
// application. This should be remedied in the new framework.
$app = $event->getArgument('app');
if ($app->getCfg('force_ssl') == 2 && php_sapi_name() != 'cli') {
$uri = JURI::getInstance();
if (strtolower($uri->getScheme()) != 'https') {
// We also can't use the Application::redirect method here as
// it tries to use JFactory::getDocument, which doesn't work
// prior to application initialization
$uri->setScheme('https');
header('HTTP/1.1 303 See other');
header('Location: ' . (string) $uri);
header('Content-Type: text/html;');
$app->close();
}
}
}, 'application_onBeforeSessionCreate');
parent::__construct($config);
}
示例4: array
/**
* Class constructor
*
* @access protected
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
function __construct($config = array())
{
$config['clientId'] = 0;
parent::__construct($config);
//Set the root in the URI based on the application name
JURI::root(null, str_replace('/' . JPATH_FORUM_PATH, '', JURI::base(true)));
}
示例5: __construct
/**
* Class constructor
*
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*
* @return void
*/
public function __construct(array $config = array())
{
$config['clientId'] = 2;
parent::__construct($config);
$this->_createConfiguration('');
// Set the root in the URI based on the application name.
JURI::root(null, str_replace('/' . $this->getName(), '', JURI::base(true)));
}
示例6: array
/**
* Class constructor
*
* @access protected
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
function __construct($config = array())
{
$config['clientId'] = 2;
parent::__construct($config);
JError::setErrorHandling(E_ALL, 'Ignore');
$this->_createConfiguration();
//Set the root in the URI based on the application name
JURI::root(null, str_replace('/' . $this->getName(), '', JURI::base(true)));
}
示例7: array
/**
* Class constructor
*
* @access protected
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
function __construct($config = array())
{
$config['clientId'] = 1;
$config['multisite'] = true;
$config['session_autostart'] = true;
//override the configruation settings
parent::__construct($config);
//Set the root in the URI based on the application name
JURI::root(null, str_replace('/' . $this->getName(), '', JURI::base(true)));
}
示例8: __construct
/**
* Class constructor
*
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*
* @return void
*/
public function __construct(array $config = array())
{
$config['clientId'] = 2;
parent::__construct($config);
$this->_createConfiguration('');
// Set the root in the URI one level up.
$parts = explode('/', JUri::base(true));
array_pop($parts);
JUri::root(null, implode('/', $parts));
}
示例9: __construct
/**
* Class constructor
*
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
public function __construct($config = array())
{
$config['clientId'] = 0;
parent::__construct($config);
}
示例10: __construct
/**
* Class constructor.
*
* @param array $config A configuration array including optional elements such as session
* session_name, clientId and others. This is not exhaustive.
* @return void
*/
public function __construct($config = array())
{
JLoader::import('joomla.user.user');
JLoader::register('JText', JPATH_LIBRARIES . DS . 'joomla' . DS . 'methods.php');
JLoader::import('joomla.filter.filterinput');
JLoader::import('joomla.environment.uri');
JLoader::import('Hubzero.Api.Response');
JLoader::import('Hubzero.Api.Request');
$config['clientId'] = 4;
/*$this->unregister_long_arrays();
$this->unregister_globals();
$this->fix_http_headers();
$this->request = new \Hubzero\Api\Request();
$this->response = new \Hubzero\Api\Response();
$this->output = '';*/
parent::__construct($config);
}
示例11: mosMainFrame
/**
* Class constructor
* @param database A database connection object
* @param string The url option [DEPRECATED]
* @param string The path of the mos directory [DEPRECATED]
*/
function mosMainFrame(&$db, $option, $basePath = null, $client = 0)
{
$config = array();
$config['clientId'] = $client;
parent::__construct($config);
}
示例12: __construct
/**
* Class constructor
*
* @param array An optional associative array of configuration settings.
* Recognized key values include 'clientId' (this list is not meant to be comprehensive).
*/
public function __construct($config = array())
{
$config['clientId'] = 0;
parent::__construct($config);
$this->_verbose = Commandline::getInstance()->get('V');
}