Open Monograph Press  3.3.0
PKPRequest.inc.php
1 <?php
2 
17 class PKPRequest {
18  //
19  // Internal state - please do not reference directly
20  //
22  var $_router = null;
23 
25  var $_dispatcher = null;
26 
28  var $_requestVars = null;
29 
32 
34  var $_requestPath;
35 
38 
41 
44 
46  var $_protocol;
47 
49  var $_isBot;
50 
52  var $_userAgent;
53 
54 
59  function &getRouter() {
60  return $this->_router;
61  }
62 
67  function setRouter($router) {
68  $this->_router = $router;
69  }
70 
75  function setDispatcher($dispatcher) {
76  $this->_dispatcher = $dispatcher;
77  }
78 
83  function &getDispatcher() {
84  return $this->_dispatcher;
85  }
86 
87 
92  function redirectUrl($url) {
93  if (HookRegistry::call('Request::redirect', array(&$url))) {
94  return;
95  }
96 
97  header("Location: $url");
98  exit();
99  }
100 
106  function redirectUrlJson($url) {
107  import('lib.pkp.classes.core.JSONMessage');
108  $json = new JSONMessage(true);
109  $json->setEvent('redirectRequested', $url);
110  return $json;
111  }
112 
116  function redirectSSL() {
117  // Note that we are intentionally skipping PKP processing of REQUEST_URI and QUERY_STRING for a protocol redirect
118  // This processing is deferred to the redirected (target) URI
119  $url = 'https://' . $this->getServerHost() . $_SERVER['REQUEST_URI'];
120  $queryString = $_SERVER['QUERY_STRING'];
121  if (!empty($queryString)) $url .= "?$queryString";
122  $this->redirectUrl($url);
123  }
124 
128  function redirectNonSSL() {
129  // Note that we are intentionally skipping PKP processing of REQUEST_URI and QUERY_STRING for a protocol redirect
130  // This processing is deferred to the redirected (target) URI
131  $url = 'http://' . $this->getServerHost() . $_SERVER['REQUEST_URI'];
132  $queryString = $_SERVER['QUERY_STRING'];
133  if (!empty($queryString)) $url .= "?$queryString";
134  $this->redirectUrl($url);
135  }
136 
141  function getIfModifiedSince() {
142  if (!isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) return null;
143  return strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);
144  }
145 
151  function getBaseUrl($allowProtocolRelative = false) {
152  $serverHost = $this->getServerHost(false);
153  if ($serverHost !== false) {
154  // Auto-detection worked.
155  if ($allowProtocolRelative) {
156  $baseUrl = '//' . $this->getServerHost() . $this->getBasePath();
157  } else {
158  $baseUrl = $this->getProtocol() . '://' . $this->getServerHost() . $this->getBasePath();
159  }
160  } else {
161  // Auto-detection didn't work (e.g. this is a command-line call); use configuration param
162  $baseUrl = Config::getVar('general', 'base_url');
163  }
164  HookRegistry::call('Request::getBaseUrl', array(&$baseUrl));
165  return $baseUrl;
166  }
167 
172  function getBasePath() {
173  if (!isset($this->_basePath)) {
174  // Strip the PHP filename off of the script's executed path
175  // We expect the SCRIPT_NAME to look like /path/to/file.php
176  // If the SCRIPT_NAME ends in /, assume this is the directory and the script's actual name
177  // is masked as the DirectoryIndex
178  // If the SCRIPT_NAME ends in neither / or .php, assume the the script's actual name is masked
179  // and we need to avoid stripping the terminal directory
180  $path = preg_replace('#/[^/]*$#', '', $_SERVER['SCRIPT_NAME'].(substr($_SERVER['SCRIPT_NAME'], -1) == '/' || preg_match('#.php$#i', $_SERVER['SCRIPT_NAME']) ? '' : '/'));
181 
182  // Encode characters which need to be encoded in a URL.
183  // Simply using rawurlencode() doesn't work because it
184  // also encodes characters which are valid in a URL (i.e. @, $).
185  $parts = explode('/', $path);
186  foreach ($parts as $i => $part) {
187  $pieces = array_map(array($this, 'encodeBasePathFragment'), str_split($part));
188  $parts[$i] = implode('', $pieces);
189  }
190  $this->_basePath = implode('/', $parts);
191 
192  if ($this->_basePath == '/' || $this->_basePath == '\\') {
193  $this->_basePath = '';
194  }
195  HookRegistry::call('Request::getBasePath', array(&$this->_basePath));
196  }
197 
198  return $this->_basePath;
199  }
200 
207  function encodeBasePathFragment($fragment) {
208  if (!preg_match('/[A-Za-z0-9-._~!$&\'()*+,;=:@]/', $fragment)) {
209  return rawurlencode($fragment);
210  }
211  return $fragment;
212  }
213 
218  function getIndexUrl() {
219  static $indexUrl;
220 
221  if (!isset($indexUrl)) {
222  $indexUrl = $this->_delegateToRouter('getIndexUrl');
223 
224  // Call legacy hook
225  HookRegistry::call('Request::getIndexUrl', array(&$indexUrl));
226  }
227 
228  return $indexUrl;
229  }
230 
235  function getCompleteUrl() {
236  static $completeUrl;
237 
238  if (!isset($completeUrl)) {
239  $completeUrl = $this->getRequestUrl();
240  $queryString = $this->getQueryString();
241  if (!empty($queryString)) $completeUrl .= "?$queryString";
242  HookRegistry::call('Request::getCompleteUrl', array(&$completeUrl));
243  }
244 
245  return $completeUrl;
246  }
247 
252  function getRequestUrl() {
253  static $requestUrl;
254 
255  if (!isset($requestUrl)) {
256  $requestUrl = $this->getProtocol() . '://' . $this->getServerHost() . $this->getRequestPath();
257  HookRegistry::call('Request::getRequestUrl', array(&$requestUrl));
258  }
259 
260  return $requestUrl;
261  }
262 
267  function getQueryString() {
268  static $queryString;
269 
270  if (!isset($queryString)) {
271  $queryString = isset($_SERVER['QUERY_STRING'])?$_SERVER['QUERY_STRING']:'';
272  HookRegistry::call('Request::getQueryString', array(&$queryString));
273  }
274 
275  return $queryString;
276  }
277 
284  function getQueryArray() {
285  $queryString = $this->getQueryString();
286  $queryArray = array();
287 
288  if (isset($queryString)) {
289  parse_str($queryString, $queryArray);
290  }
291 
292  // Filter out disable_path_info reserved parameters
293  foreach (array_merge(Application::getContextList(), array('path', 'page', 'op')) as $varName) {
294  if (isset($queryArray[$varName])) unset($queryArray[$varName]);
295  }
296 
297  return $queryArray;
298  }
299 
304  function getRequestPath() {
305  if (!isset($this->_requestPath)) {
306  if ($this->isRestfulUrlsEnabled()) {
307  $this->_requestPath = $this->getBasePath();
308  } else {
309  $this->_requestPath = isset($_SERVER['SCRIPT_NAME'])?$_SERVER['SCRIPT_NAME']:'';
310  }
311 
312  if ($this->isPathInfoEnabled()) {
313  $this->_requestPath .= isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '';
314  }
315  HookRegistry::call('Request::getRequestPath', array(&$this->_requestPath));
316  }
318  }
319 
326  function getServerHost($default = null, $includePort = true) {
327  if ($default === null) $default = 'localhost';
328 
329  if (!isset($this->_serverHost)) {
330  $this->_serverHost = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST']
331  : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST']
332  : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME']
333  : $default));
334  // in case of multiple host entries in the header (e.g. multiple reverse proxies) take the first entry
335  $this->_serverHost = strtok($this->_serverHost, ',');
336  HookRegistry::call('Request::getServerHost', array(&$this->_serverHost, &$default, &$includePort));
337  }
338  if (!$includePort) {
339  // Strip the port number, if one is included. (#3912)
340  return preg_replace("/:\d*$/", '', $this->_serverHost);
341  }
342  return $this->_serverHost;
343  }
344 
349  function getProtocol() {
350  if (!isset($this->_protocol)) {
351  $this->_protocol = (!isset($_SERVER['HTTPS']) || strtolower_codesafe($_SERVER['HTTPS']) != 'on') ? 'http' : 'https';
352  HookRegistry::call('Request::getProtocol', array(&$this->_protocol));
353  }
354  return $this->_protocol;
355  }
356 
361  function getRequestMethod() {
362  return (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '');
363  }
364 
369  function isPost() {
370  return ($this->getRequestMethod() == 'POST');
371  }
372 
377  function isGet() {
378  return ($this->getRequestMethod() == 'GET');
379  }
380 
385  function checkCSRF() {
386  $session = $this->getSession();
387  return $this->getUserVar('csrfToken') == $session->getCSRFToken();
388  }
389 
394  function getRemoteAddr() {
395  $ipaddr =& Registry::get('remoteIpAddr'); // Reference required.
396  if (is_null($ipaddr)) {
397  if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&
398  Config::getVar('general', 'trust_x_forwarded_for', true) &&
399  preg_match_all('/([0-9.a-fA-F:]+)/', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
400  } else if (isset($_SERVER['REMOTE_ADDR']) &&
401  preg_match_all('/([0-9.a-fA-F:]+)/', $_SERVER['REMOTE_ADDR'], $matches)) {
402  } else if (preg_match_all('/([0-9.a-fA-F:]+)/', getenv('REMOTE_ADDR'), $matches)) {
403  } else {
404  $ipaddr = '';
405  }
406 
407  if (!isset($ipaddr)) {
408  // If multiple addresses are listed, take the last. (Supports ipv6.)
409  $ipaddr = $matches[0][count($matches[0])-1];
410  }
411  HookRegistry::call('Request::getRemoteAddr', array(&$ipaddr));
412  }
413  return $ipaddr;
414  }
415 
420  function getRemoteDomain() {
421  static $remoteDomain;
422  if (!isset($remoteDomain)) {
423  $remoteDomain = null;
424  $remoteDomain = @getHostByAddr($this->getRemoteAddr());
425  HookRegistry::call('Request::getRemoteDomain', array(&$remoteDomain));
426  }
427  return $remoteDomain;
428  }
429 
434  function getUserAgent() {
435  if (!isset($this->_userAgent)) {
436  if (isset($_SERVER['HTTP_USER_AGENT'])) {
437  $this->_userAgent = $_SERVER['HTTP_USER_AGENT'];
438  }
439  if (!isset($this->_userAgent) || empty($this->_userAgent)) {
440  $this->_userAgent = getenv('HTTP_USER_AGENT');
441  }
442  if (!isset($this->_userAgent) || $this->_userAgent == false) {
443  $this->_userAgent = '';
444  }
445  HookRegistry::call('Request::getUserAgent', array(&$this->_userAgent));
446  }
447  return $this->_userAgent;
448  }
449 
454  function isBot() {
455  if (!isset($this->_isBot)) {
456  $userAgent = $this->getUserAgent();
457  $this->_isBot = Core::isUserAgentBot($userAgent);
458  }
459  return $this->_isBot;
460  }
461 
465  function isPathInfoEnabled() {
466  if (!isset($this->_isPathInfoEnabled)) {
467  $this->_isPathInfoEnabled = Config::getVar('general', 'disable_path_info')?false:true;
468  }
470  }
471 
475  function isRestfulUrlsEnabled() {
476  if (!isset($this->_isRestfulUrlsEnabled)) {
477  $this->_isRestfulUrlsEnabled = Config::getVar('general', 'restful_urls')?true:false;
478  }
480  }
481 
486  function &getSite() {
487  $site =& Registry::get('site', true, null);
488  if ($site === null) {
489  $siteDao = DAORegistry::getDAO('SiteDAO'); /* @var $siteDao SiteDAO */
490  $site = $siteDao->getSite();
491  // PHP bug? This is needed for some reason or extra queries results.
492  Registry::set('site', $site);
493  }
494 
495  return $site;
496  }
497 
502  function &getSession() {
503  $session =& Registry::get('session', true, null);
504 
505  if ($session === null) {
506  $sessionManager = SessionManager::getManager();
507  $session = $sessionManager->getUserSession();
508  }
509 
510  return $session;
511  }
512 
517  function &getUser() {
518  $user =& Registry::get('user', true, null);
519 
520  $router = $this->getRouter();
521  if (!is_null($handler = $router->getHandler()) && !is_null($token = $handler->getApiToken())) {
522  if ($user === null) {
523  $userDao = DAORegistry::getDAO('UserDAO'); /* @var $userDao UserDAO */
524  $user = $userDao->getBySetting('apiKey', $token);
525  }
526  if (is_null($user) || !$user->getData('apiKeyEnabled')) {
527  $user = null;
528  }
529  return $user;
530  }
531 
532  if ($user === null) {
533  $sessionManager = SessionManager::getManager();
534  $session = $sessionManager->getUserSession();
535  $user = $session->getUser();
536  }
537 
538  return $user;
539  }
540 
545  function getUserVar($key) {
546  // special treatment for APIRouter. APIHandler gets to fetch parameter first
547  $router = $this->getRouter();
548  if (is_a($router, 'APIRouter') && (!is_null($handler = $router->getHandler()))) {
549  $handler = $router->getHandler();
550  $value = $handler->getParameter($key);
551  if (!is_null($value)) {
552  return $value;
553  }
554  }
555 
556  // Get all vars (already cleaned)
557  $vars = $this->getUserVars();
558 
559  if (isset($vars[$key])) {
560  return $vars[$key];
561  } else {
562  return null;
563  }
564  }
565 
570  function &getUserVars() {
571  if (!isset($this->_requestVars)) {
572  $this->_requestVars = array_map(function($s) {
573  return is_string($s)?trim($s):$s;
574  }, array_merge($_GET, $_POST));
575  }
576 
577  return $this->_requestVars;
578  }
579 
592  function getUserDateVar($prefix, $defaultDay = null, $defaultMonth = null, $defaultYear = null, $defaultHour = 0, $defaultMinute = 0, $defaultSecond = 0) {
593  $monthPart = $this->getUserVar($prefix . 'Month');
594  $dayPart = $this->getUserVar($prefix . 'Day');
595  $yearPart = $this->getUserVar($prefix . 'Year');
596  $hourPart = $this->getUserVar($prefix . 'Hour');
597  $minutePart = $this->getUserVar($prefix . 'Minute');
598  $secondPart = $this->getUserVar($prefix . 'Second');
599 
600  switch ($this->getUserVar($prefix . 'Meridian')) {
601  case 'pm':
602  if (is_numeric($hourPart) && $hourPart != 12) $hourPart += 12;
603  break;
604  case 'am':
605  default:
606  // Do nothing.
607  break;
608  }
609 
610  if (empty($dayPart)) $dayPart = $defaultDay;
611  if (empty($monthPart)) $monthPart = $defaultMonth;
612  if (empty($yearPart)) $yearPart = $defaultYear;
613  if (empty($hourPart)) $hourPart = $defaultHour;
614  if (empty($minutePart)) $minutePart = $defaultMinute;
615  if (empty($secondPart)) $secondPart = $defaultSecond;
616 
617  if (empty($monthPart) || empty($dayPart) || empty($yearPart)) return null;
618  return mktime($hourPart, $minutePart, $secondPart, $monthPart, $dayPart, $yearPart);
619  }
620 
625  function getCookieVar($key) {
626  if (isset($_COOKIE[$key])) {
627  return $_COOKIE[$key];
628  } else {
629  return null;
630  }
631  }
632 
639  function setCookieVar($key, $value, $expire = 0) {
640  $basePath = $this->getBasePath();
641  if (!$basePath) $basePath = '/';
642 
643  setcookie($key, $value, $expire, $basePath);
644  $_COOKIE[$key] = $value;
645  }
646 
657  function redirect($context = null, $page = null, $op = null, $path = null, $params = null, $anchor = null) {
658  $dispatcher = $this->getDispatcher();
659  $this->redirectUrl($dispatcher->url($this, ROUTE_PAGE, $context, $page, $op, $path, $params, $anchor));
660  }
661 
667  function &getContext() {
668  return $this->_delegateToRouter('getContext');
669  }
670 
675  function getRequestedContextPath($contextLevel = null) {
676  // Emulate the old behavior of getRequestedContextPath for
677  // backwards compatibility.
678  if (is_null($contextLevel)) {
679  return $this->_delegateToRouter('getRequestedContextPaths');
680  } else {
681  return array($this->_delegateToRouter('getRequestedContextPath', $contextLevel));
682  }
683  }
684 
689  function getRequestedPage() {
690  return $this->_delegateToRouter('getRequestedPage');
691  }
692 
697  function getRequestedOp() {
698  return $this->_delegateToRouter('getRequestedOp');
699  }
700 
705  function getRequestedArgs() {
706  return $this->_delegateToRouter('getRequestedArgs');
707  }
708 
713  function url($context = null, $page = null, $op = null, $path = null,
714  $params = null, $anchor = null, $escape = false) {
715  return $this->_delegateToRouter('url', $context, $page, $op, $path,
716  $params, $anchor, $escape);
717  }
718 
732  function &_delegateToRouter($method) {
733  // This call is deprecated. We don't trigger a
734  // deprecation error, though, as there are so
735  // many instances of this error that it has a
736  // performance impact and renders the error
737  // log virtually useless when deprecation
738  // warnings are switched on.
739  // FIXME: Fix enough instances of this error so that
740  // we can put a deprecation warning in here.
741  $router = $this->getRouter();
742 
743  if (is_null($router)) {
744  assert(false);
745  $nullValue = null;
746  return $nullValue;
747  }
748 
749  // Construct the method call
750  $callable = array($router, $method);
751 
752  // Get additional parameters but replace
753  // the first parameter (currently the
754  // method to be called) with the request
755  // as all router methods required the request
756  // as their first parameter.
757  $parameters = func_get_args();
758  $parameters[0] =& $this;
759 
760  $returner = call_user_func_array($callable, $parameters);
761  return $returner;
762  }
763 }
PKPRequest\$_isPathInfoEnabled
$_isPathInfoEnabled
Definition: PKPRequest.inc.php:61
PKPRequest\$_isRestfulUrlsEnabled
$_isRestfulUrlsEnabled
Definition: PKPRequest.inc.php:55
PKPRequest\setCookieVar
setCookieVar($key, $value, $expire=0)
Definition: PKPRequest.inc.php:672
PKPRequest\redirectUrlJson
redirectUrlJson($url)
Definition: PKPRequest.inc.php:139
PKPRequest\redirect
redirect($context=null, $page=null, $op=null, $path=null, $params=null, $anchor=null)
Definition: PKPRequest.inc.php:690
PKPRequest\getQueryString
getQueryString()
Definition: PKPRequest.inc.php:300
$op
$op
Definition: lib/pkp/pages/help/index.php:18
SessionManager\getManager
static getManager()
Definition: SessionManager.inc.php:124
PKPRequest\getRequestedArgs
getRequestedArgs()
Definition: PKPRequest.inc.php:738
PKPRequest\$_userAgent
$_userAgent
Definition: PKPRequest.inc.php:85
PKPRequest\getServerHost
getServerHost($default=null, $includePort=true)
Definition: PKPRequest.inc.php:359
PKPRequest\setDispatcher
setDispatcher($dispatcher)
Definition: PKPRequest.inc.php:108
PKPRequest\checkCSRF
checkCSRF()
Definition: PKPRequest.inc.php:418
PKPRequest\isPathInfoEnabled
isPathInfoEnabled()
Definition: PKPRequest.inc.php:498
PKPRequest\getRequestMethod
getRequestMethod()
Definition: PKPRequest.inc.php:394
PKPRequest\$_requestPath
$_requestPath
Definition: PKPRequest.inc.php:49
PKPRequest\getRouter
& getRouter()
Definition: PKPRequest.inc.php:92
PKPRequest\getRequestPath
getRequestPath()
Definition: PKPRequest.inc.php:337
PKPRequest\getUserVars
& getUserVars()
Definition: PKPRequest.inc.php:603
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
PKPRequest\getDispatcher
& getDispatcher()
Definition: PKPRequest.inc.php:116
PKPRequest\getUserDateVar
getUserDateVar($prefix, $defaultDay=null, $defaultMonth=null, $defaultYear=null, $defaultHour=0, $defaultMinute=0, $defaultSecond=0)
Definition: PKPRequest.inc.php:625
PKPRequest\isBot
isBot()
Definition: PKPRequest.inc.php:487
PKPRequest\setRouter
setRouter($router)
Definition: PKPRequest.inc.php:100
PKPRequest\$_serverHost
$_serverHost
Definition: PKPRequest.inc.php:67
PKPRequest\isPost
isPost()
Definition: PKPRequest.inc.php:402
PKPRequest\getIfModifiedSince
getIfModifiedSince()
Definition: PKPRequest.inc.php:174
PKPRequest\getCompleteUrl
getCompleteUrl()
Definition: PKPRequest.inc.php:268
Registry\set
static set($key, &$value)
Definition: Registry.inc.php:53
PKPRequest\getContext
& getContext()
Definition: PKPRequest.inc.php:700
PKPRequest\getSite
& getSite()
Definition: PKPRequest.inc.php:519
PKPRequest\_delegateToRouter
& _delegateToRouter($method)
Definition: PKPRequest.inc.php:765
PKPRequest\getRequestUrl
getRequestUrl()
Definition: PKPRequest.inc.php:285
PKPRequest\redirectSSL
redirectSSL()
Definition: PKPRequest.inc.php:149
PKPRequest\getRequestedOp
getRequestedOp()
Definition: PKPRequest.inc.php:730
PKPRequest
Class providing operations associated with HTTP requests.
Definition: PKPRequest.inc.php:17
PKPRequest\getRemoteAddr
getRemoteAddr()
Definition: PKPRequest.inc.php:427
PKPRequest\$_router
$_router
Definition: PKPRequest.inc.php:25
Registry\get
static & get($key, $createIfEmpty=false, $createWithDefault=null)
Definition: Registry.inc.php:35
JSONMessage
Class to represent a JSON (Javascript Object Notation) message.
Definition: JSONMessage.inc.php:18
PKPRequest\encodeBasePathFragment
encodeBasePathFragment($fragment)
Definition: PKPRequest.inc.php:240
Config\getVar
static getVar($section, $key, $default=null)
Definition: Config.inc.php:35
PKPRequest\getRequestedContextPath
getRequestedContextPath($contextLevel=null)
Definition: PKPRequest.inc.php:708
PKPRequest\$_basePath
$_basePath
Definition: PKPRequest.inc.php:43
PKPRequest\getUserAgent
getUserAgent()
Definition: PKPRequest.inc.php:467
Core\isUserAgentBot
static isUserAgentBot($userAgent, $botRegexpsFile=COUNTER_USER_AGENTS_FILE)
Definition: Core.inc.php:103
PKPRequest\redirectUrl
redirectUrl($url)
Definition: PKPRequest.inc.php:125
PKPRequest\getUserVar
getUserVar($key)
Definition: PKPRequest.inc.php:578
PKPRequest\getCookieVar
getCookieVar($key)
Definition: PKPRequest.inc.php:658
PKPRequest\getRemoteDomain
getRemoteDomain()
Definition: PKPRequest.inc.php:453
PKPRequest\isGet
isGet()
Definition: PKPRequest.inc.php:410
PKPRequest\redirectNonSSL
redirectNonSSL()
Definition: PKPRequest.inc.php:161
PKPRequest\$_requestVars
$_requestVars
Definition: PKPRequest.inc.php:37
PKPRequest\getBasePath
getBasePath()
Definition: PKPRequest.inc.php:205
strtolower_codesafe
strtolower_codesafe($str)
Definition: functions.inc.php:280
PKPRequest\getRequestedPage
getRequestedPage()
Definition: PKPRequest.inc.php:722
PKPRequest\isRestfulUrlsEnabled
isRestfulUrlsEnabled()
Definition: PKPRequest.inc.php:508
PKPRequest\$_dispatcher
$_dispatcher
Definition: PKPRequest.inc.php:31
PKPRequest\getProtocol
getProtocol()
Definition: PKPRequest.inc.php:382
PKPRequest\getIndexUrl
getIndexUrl()
Definition: PKPRequest.inc.php:251
PKPRequest\getSession
& getSession()
Definition: PKPRequest.inc.php:535
PKPRequest\url
url($context=null, $page=null, $op=null, $path=null, $params=null, $anchor=null, $escape=false)
Definition: PKPRequest.inc.php:746
PKPRequest\$_isBot
$_isBot
Definition: PKPRequest.inc.php:79
HookRegistry\call
static call($hookName, $args=null)
Definition: HookRegistry.inc.php:86
PKPRequest\getUser
& getUser()
Definition: PKPRequest.inc.php:550
Application\getContextList
getContextList()
Definition: Application.inc.php:54
PKPRequest\$_protocol
$_protocol
Definition: PKPRequest.inc.php:73
PKPRequest\getQueryArray
getQueryArray()
Definition: PKPRequest.inc.php:317
PKPRequest\getBaseUrl
getBaseUrl($allowProtocolRelative=false)
Definition: PKPRequest.inc.php:184