本文整理汇总了PHP中Hubzero\Component\SiteController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteController::__construct方法的具体用法?PHP SiteController::__construct怎么用?PHP SiteController::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hubzero\Component\SiteController
的用法示例。
在下文中一共展示了SiteController::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @return void
*/
public function __construct()
{
// create our oauth server
$this->server = new \Hubzero\Oauth\Server(new MysqlStorage());
// do the rest of setup
$this->disableDefaultTask();
parent::__construct();
}
示例2: __construct
/**
* Constructor
*
* @param array $config Optional configurations
* @return void
*/
public function __construct($config = array())
{
if (!isset($config['scope'])) {
$config['scope'] = 'site';
}
if (!isset($config['scope_id'])) {
$config['scope_id'] = 0;
}
$this->book = new Book($config['scope'], $config['scope_id']);
if ($config['scope'] != 'site') {
Request::setVar('task', Request::getWord('action'));
}
parent::__construct($config);
}
示例3: __construct
/**
* Constructor
*
* @param array $config Optional configurations
* @return void
*/
public function __construct($config = array())
{
$this->_base_path = dirname(__DIR__);
if (isset($config['base_path'])) {
$this->_base_path = $config['base_path'];
}
$this->_sub = false;
if (isset($config['sub'])) {
$this->_sub = $config['sub'];
}
$this->_group = false;
if (isset($config['group'])) {
$this->_group = $config['group'];
}
parent::__construct($config);
}
示例4: __construct
/**
* Constructor
*
* @param array $config Optional configurations
* @return void
*/
public function __construct($config = array())
{
$this->_base_path = dirname(__DIR__);
if (isset($config['base_path'])) {
$this->_base_path = $config['base_path'];
}
$this->_sub = false;
if (isset($config['sub'])) {
$this->_sub = $config['sub'];
}
$this->_group = false;
if (isset($config['group'])) {
$this->_group = $config['group'];
}
if ($this->_sub) {
Request::setVar('task', Request::getWord('action'));
}
$this->book = new Book($this->_group ? $this->_group : '__site__');
parent::__construct($config);
}