本文整理汇总了PHP中PKPRequest::_checkThis方法的典型用法代码示例。如果您正苦于以下问题:PHP PKPRequest::_checkThis方法的具体用法?PHP PKPRequest::_checkThis怎么用?PHP PKPRequest::_checkThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PKPRequest
的用法示例。
在下文中一共展示了PKPRequest::_checkThis方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirectHome
/**
* Deprecated
* @see PageRouter::redirectHome()
*/
function redirectHome()
{
$_this =& PKPRequest::_checkThis();
return $_this->_delegateToRouter('redirectHome');
}
示例2: handle404
/**
* Handle a 404 error (page not found).
*/
function handle404()
{
PKPRequest::_checkThis();
header('HTTP/1.0 404 Not Found');
fatalError('404 Not Found');
}
示例3: array
/**
* This method exists to maintain backwards compatibility
* with calls to methods that have been factored into the
* Router implementations.
*
* It delegates the call to the router and returns the result.
*
* NB: This method is protected and may not be used by
* external classes. It should also only be used in legacy
* methods.
*
* @return mixed depends on the called method
*/
function &_delegateToRouter($method)
{
$_this =& PKPRequest::_checkThis();
if (is_null($_this->_deprecationWarning)) {
$_this->_deprecationWarning = Config::getVar('debug', 'deprecation_warnings');
if (is_null($_this->_deprecationWarning)) {
$_this->_deprecationWarning = false;
}
}
if ($_this->_deprecationWarning) {
trigger_error('Deprecated function');
}
$router =& $_this->getRouter();
// Construct the method call
$callable = array($router, $method);
// Get additional parameters but replace
// the first parameter (currently the
// method to be called) with the request
// as all router methods required the request
// as their first parameter.
$parameters = func_get_args();
$parameters[0] =& $_this;
$returner = call_user_func_array($callable, $parameters);
return $returner;
}
示例4: array
/**
* This method exists to maintain backwards compatibility
* with calls to methods that have been factored into the
* Router implementations.
*
* It delegates the call to the router and returns the result.
*
* NB: This method is protected and may not be used by
* external classes. It should also only be used in legacy
* methods.
*
* @return mixed depends on the called method
*/
function &_delegateToRouter($method)
{
// This call is deprecated. We don't trigger a
// deprecation error, though, as there are so
// many instances of this error that it has a
// performance impact and renders the error
// log virtually useless when deprecation
// warnings are switched on.
// FIXME: Fix enough instances of this error so that
// we can put a deprecation warning in here.
$_this =& PKPRequest::_checkThis();
$router =& $_this->getRouter();
// Construct the method call
$callable = array($router, $method);
// Get additional parameters but replace
// the first parameter (currently the
// method to be called) with the request
// as all router methods required the request
// as their first parameter.
$parameters = func_get_args();
$parameters[0] =& $_this;
$returner = call_user_func_array($callable, $parameters);
return $returner;
}
示例5: updateReviewForm
/**
* Save changes to a review form.
*/
function updateReviewForm()
{
$this->validate();
$this->setupTemplate(true, $reviewForm);
$reviewFormId = Request::getUserVar('reviewFormId') === null ? null : (int) Request::getUserVar('reviewFormId');
$conference =& Request::getConference();
$reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
$reviewForm =& $reviewFormDao->getReviewForm($reviewFormId, ASSOC_TYPE_CONFERENCE, $conference->getId());
//if ($reviewFormId != null && (!isset($reviewForm) || $reviewForm->getIncompleteCount() != 0)) {
if ($reviewFormId != null && !isset($reviewForm)) {
$source = Request::getUserVar('source');
if (!isset($source)) {
Request::redirect(null, null, null, 'reviewForms');
} else {
$source = $source . '/' . $reviewFormId;
PKPRequest::_checkThis()->url($source);
}
}
import('manager.form.ReviewFormForm');
$reviewFormForm = new ReviewFormForm($reviewFormId);
$reviewFormForm->readInputData();
if ($reviewFormForm->validate()) {
$reviewFormId = $reviewFormForm->execute();
//Request::redirect(null, null, null, 'reviewForms');
$source = Request::getUserVar('source');
if (!isset($source)) {
Request::redirect(null, null, null, 'reviewForms');
} else {
$source = $source . '/' . $reviewFormId;
header("Location: " . $source);
}
} else {
$templateMgr =& TemplateManager::getManager();
if ($reviewFormId == null) {
$templateMgr->assign('pageTitle', 'manager.reviewForms.create');
} else {
$templateMgr->assign('pageTitle', 'manager.reviewForms.edit');
}
$reviewFormForm->display();
}
}