本文整理汇总了PHP中phpbb\request\request_interface::get_super_global方法的典型用法代码示例。如果您正苦于以下问题:PHP request_interface::get_super_global方法的具体用法?PHP request_interface::get_super_global怎么用?PHP request_interface::get_super_global使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpbb\request\request_interface
的用法示例。
在下文中一共展示了request_interface::get_super_global方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param \phpbb\request\request_interface $phpbb_request
*/
public function __construct(\phpbb\request\request_interface $phpbb_request)
{
$get_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::GET);
$post_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::POST);
$server_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::SERVER);
$files_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::FILES);
$cookie_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::COOKIE);
parent::__construct($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
}
示例2: get_current_uri
/**
* Returns the cached current_uri object or creates and caches it if it is
* not already created. In each case the query string is updated based on
* the $query parameter.
*
* @param string $service_name The name of the service
* @param string $query The query string of the current_uri
* used in redirects
* @return \OAuth\Common\Http\Uri\UriInterface
*/
protected function get_current_uri($service_name, $query)
{
if ($this->current_uri) {
$this->current_uri->setQuery($query);
return $this->current_uri;
}
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
$current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(\phpbb\request\request_interface::SERVER));
$current_uri->setQuery($query);
$this->current_uri = $current_uri;
return $current_uri;
}
示例3: get_current_uri
/**
* Returns the cached current_uri object or creates and caches it if it is
* not already created. In each case the query string is updated based on
* the $query parameter.
*
* @param string $service_name The name of the service
* @param string $query The query string of the current_uri
* used in redirects
* @return \OAuth\Common\Http\Uri\UriInterface
*/
protected function get_current_uri($service_name, $query)
{
if ($this->current_uri) {
$this->current_uri->setQuery($query);
return $this->current_uri;
}
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
$super_globals = $this->request->get_super_global(\phpbb\request\request_interface::SERVER);
if (!empty($super_globals['HTTP_X_FORWARDED_PROTO']) && $super_globals['HTTP_X_FORWARDED_PROTO'] === 'https') {
$super_globals['HTTPS'] = 'on';
$super_globals['SERVER_PORT'] = 443;
}
$current_uri = $uri_factory->createFromSuperGlobalArray($super_globals);
$current_uri->setQuery($query);
$this->current_uri = $current_uri;
return $current_uri;
}
示例4: rfd_api_pre_create_topic
public function rfd_api_pre_create_topic(phpbbEvent $event)
{
$data = $event->get_data();
$forum_id = $data['forum_id'];
$errors = $data['errors'];
$post = $this->request->get_super_global(\phpbb\request\request::POST);
$type = $post['trader_type'];
//TODO:: resolve the trader_type parameter
if ($this->manager->getForumStatus($forum_id)) {
$type = $this->manager->validateForumType($forum_id, $type, true);
// Expose error if trader_type is not supported by the forum
if (is_null($type)) {
$errors[] = 'This forum does not support that trader type';
$data['errors'] = $errors;
$event->set_data($data);
} else {
$this->request->overwrite('prefixfield', $type, \phpbb\request\request_interface::POST);
}
}
}