00001 <?php
00002
00018 import('lib.pkp.classes.core.PKPRequest');
00019
00020 class Request extends PKPRequest {
00025 function getRequestedPressPath() {
00026 static $press;
00027 $_this =& PKPRequest::_checkThis();
00028
00029 if (!isset($press)) {
00030 $press = $_this->_delegateToRouter('getRequestedContextPath', 1);
00031 HookRegistry::call('Request::getRequestedPressPath', array(&$press));
00032 }
00033
00034 return $press;
00035 }
00036
00041 function &getPress() {
00042 $_this =& PKPRequest::_checkThis();
00043 $returner = $_this->_delegateToRouter('getContext', 1);
00044 return $returner;
00045 }
00046
00051 function getRequestedContextPath($contextLevel = null) {
00052 $_this =& PKPRequest::_checkThis();
00053
00054
00055
00056 if (is_null($contextLevel)) {
00057 return $_this->_delegateToRouter('getRequestedContextPaths');
00058 } else {
00059 return array($_this->_delegateToRouter('getRequestedContextPath', $contextLevel));
00060 }
00061 }
00062
00067 function &getContext($level = 1) {
00068 $_this =& PKPRequest::_checkThis();
00069 $returner = $_this->_delegateToRouter('getContext', $level);
00070 return $returner;
00071 }
00072
00077 function &getContextByName($contextName) {
00078 $_this =& PKPRequest::_checkThis();
00079 $returner = $_this->_delegateToRouter('getContextByName', $contextName);
00080 return $returner;
00081 }
00082
00087 function url($pressPath = null, $page = null, $op = null, $path = null,
00088 $params = null, $anchor = null, $escape = false) {
00089 $_this =& PKPRequest::_checkThis();
00090 return $_this->_delegateToRouter('url', $pressPath, $page, $op, $path,
00091 $params, $anchor, $escape);
00092 }
00093
00098 function redirectHome() {
00099 $_this =& PKPRequest::_checkThis();
00100 return $_this->_delegateToRouter('redirectHome');
00101 }
00102
00106 function getUserAgent() {
00107 static $userAgent;
00108 $userAgent = parent::getUserAgent();
00109
00110 if (strpos($userAgent, 'Shockwave Flash')) {
00111 $userAgent = $_SERVER['HTTP_BROWSER_USER_AGENT'];
00112 }
00113
00114 return $userAgent;
00115 }
00116 }
00117
00118 ?>