本文整理汇总了PHP中AuthorizationPolicy::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthorizationPolicy::__construct方法的具体用法?PHP AuthorizationPolicy::__construct怎么用?PHP AuthorizationPolicy::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthorizationPolicy
的用法示例。
在下文中一共展示了AuthorizationPolicy::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Constructor
*
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct();
$this->_request = $request;
// Add advice
$callOnDeny = array($request, 'redirectSSL', array());
$this->setAdvice(AUTHORIZATION_ADVICE_CALL_ON_DENY, $callOnDeny);
}
示例2: assert
/**
* Constructor
* @param $request PKPRequest
* @param $args array request parameters
* @param $parameterName string the request parameter we expect
* @param $message string
* @param $operations array Optional list of operations for which this check takes effect. If specified, operations outside this set will not be checked against this policy.
*/
function __construct($request, &$args, $parameterName, $message = null, $operations = null)
{
parent::__construct($message);
$this->_request = $request;
assert(is_array($args));
$this->_args =& $args;
$this->_parameterName = $parameterName;
$this->_operations = $operations;
}
示例3: assert
/**
* Constructor
* @param $request PKPRequest
* @param $operations array|string either a single operation or a list of operations that
* this policy is targeting.
* @param $message string a message to be displayed if the authorization fails
*/
function __construct($request, $operations, $message = null)
{
parent::__construct($message);
$this->_request =& $request;
// Make sure a single operation doesn't have to
// be passed in as an array.
assert(is_string($operations) || is_array($operations));
if (!is_array($operations)) {
$operations = array($operations);
}
$this->_operations = $operations;
}
示例4:
/**
* Constructor
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct('user.authorization.pluginRequired');
$this->_request = $request;
}
示例5:
/**
* Constructor
* @param $request PKPRequest
* @param $args array request arguments
* @param $roleAssignments array
*/
function __construct($request)
{
parent::__construct('user.authorization.journalDoesNotPublish');
$this->_context = $request->getContext();
}
示例6:
/**
* Constructor
*
* @param $request PKPRequest
*/
function __construct($request, $message = 'user.authorization.contextRequired')
{
parent::__construct($message);
$this->_request = $request;
}
示例7:
/**
* Constructor
*
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct();
$this->_request = $request;
}
示例8:
/**
* Constructor
* @param $stageId The one that will be checked against accessible
* user workflow stages.
*/
function __construct($stageId)
{
parent::__construct('user.authorization.accessibleWorkflowStage');
$this->_stageId = $stageId;
}
示例9:
/**
* Constructor
* @param $request PKPRequest
* @param $fileIdAndRevision string If passed, this policy will try to
* get the submission file from this data.
*/
function __construct($request, $fileIdAndRevision = null)
{
parent::__construct('user.authorization.submissionFile');
$this->_request = $request;
$this->_fileIdAndRevision = $fileIdAndRevision;
}
示例10:
/**
* Constructor
*
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct('user.authorization.restrictedSiteAccess');
$this->_request = $request;
$this->_router = $request->getRouter();
}
示例11:
/**
* Constructor
* @param $request PKPRequest
*/
function __construct($request, $contextLevel)
{
parent::__construct('user.authorization.pluginLevel');
$this->_contextLevel = $contextLevel;
}
示例12:
/**
* Constructor
* @param $stageId integer One of the WORKFLOW_STAGE_ID_* constants.
*/
function __construct($stageId)
{
parent::__construct('user.authorization.workflowStageRequired');
$this->_stageId = $stageId;
}
示例13:
/**
* Constructor
* @param $request PKPRequest
*/
function __construct($request, $contextLevel)
{
parent::__construct();
$this->_contextLevel =& $contextLevel;
}
示例14:
/**
* Constructor
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct('user.authorization.monographAuthor');
$this->_request =& $request;
}