Open Journal Systems  3.3.0
Request.inc.php
1 <?php
2 
19 import('lib.pkp.classes.core.PKPRequest');
20 
21 class Request extends PKPRequest {
27  static $journal;
28 
29  if (!isset($journal)) {
30  $journal = $this->_delegateToRouter('getRequestedContextPath', 1);
31  HookRegistry::call('Request::getRequestedJournalPath', array(&$journal));
32  }
33 
34  return $journal;
35  }
36 
40  function &getJournal() {
41  $returner = $this->_delegateToRouter('getContext', 1);
42  return $returner;
43  }
44 
49  function getRequestedContextPath($contextLevel = null) {
50  // Emulate the old behavior of getRequestedContextPath for
51  // backwards compatibility.
52  if (is_null($contextLevel)) {
53  return $this->_delegateToRouter('getRequestedContextPaths');
54  } else {
55  return array($this->_delegateToRouter('getRequestedContextPath', $contextLevel));
56  }
57  }
58 
63  function &getContext($level = 1) {
64  $returner = $this->_delegateToRouter('getContext', $level);
65  return $returner;
66  }
67 
72  function &getContextByName($contextName) {
73  $returner = $this->_delegateToRouter('getContextByName', $contextName);
74  return $returner;
75  }
76 
81  function url($journalPath = null, $page = null, $op = null, $path = null,
82  $params = null, $anchor = null, $escape = false) {
83  return $this->_delegateToRouter('url', $journalPath, $page, $op, $path,
84  $params, $anchor, $escape);
85  }
86 
91  function redirectHome() {
92  return $this->_delegateToRouter('redirectHome');
93  }
94 }
95 
96 
$op
$op
Definition: lib/pkp/pages/help/index.php:18
Request\getContext
& getContext($level=1)
Definition: Request.inc.php:63
PKPRequest\_delegateToRouter
& _delegateToRouter($method)
Definition: PKPRequest.inc.php:765
Request\getJournal
& getJournal()
Definition: Request.inc.php:40
PKPRequest
Class providing operations associated with HTTP requests.
Definition: PKPRequest.inc.php:17
Request
Mock implementation of the Request class.
Definition: Request.inc.php:21
Request\url
url($journalPath=null, $page=null, $op=null, $path=null, $params=null, $anchor=null, $escape=false)
Definition: Request.inc.php:81
Request\getRequestedJournalPath
getRequestedJournalPath()
Definition: Request.inc.php:26
Request\getContextByName
& getContextByName($contextName)
Definition: Request.inc.php:72
Request\getRequestedContextPath
getRequestedContextPath($contextLevel=null)
Definition: Request.inc.php:49
HookRegistry\call
static call($hookName, $args=null)
Definition: HookRegistry.inc.php:86
Request\redirectHome
redirectHome()
Definition: Request.inc.php:91