当前位置: 首页>>代码示例>>PHP>>正文


PHP AuthorizationPolicy::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:13,代码来源:HttpsPolicy.inc.php

示例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;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:17,代码来源:DataObjectRequiredPolicy.inc.php

示例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;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:19,代码来源:HandlerOperationPolicy.inc.php

示例4:

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function __construct($request)
 {
     parent::__construct('user.authorization.pluginRequired');
     $this->_request = $request;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:9,代码来源:PluginRequiredPolicy.inc.php

示例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();
 }
开发者ID:pkp,项目名称:ojs,代码行数:11,代码来源:OjsJournalMustPublishPolicy.inc.php

示例6:

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function __construct($request, $message = 'user.authorization.contextRequired')
 {
     parent::__construct($message);
     $this->_request = $request;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:10,代码来源:ContextRequiredPolicy.inc.php

示例7:

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function __construct($request)
 {
     parent::__construct();
     $this->_request = $request;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:10,代码来源:UserRolesRequiredPolicy.inc.php

示例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;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:10,代码来源:UserAccessibleWorkflowStagePolicy.inc.php

示例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;
 }
开发者ID:pkp,项目名称:pkp-lib,代码行数:12,代码来源:SubmissionFileBaseAccessPolicy.inc.php

示例10:

 /**
  * Constructor
  *
  * @param $request PKPRequest
  */
 function __construct($request)
 {
     parent::__construct('user.authorization.restrictedSiteAccess');
     $this->_request = $request;
     $this->_router = $request->getRouter();
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:11,代码来源:RestrictedSiteAccessPolicy.inc.php

示例11:

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function __construct($request, $contextLevel)
 {
     parent::__construct('user.authorization.pluginLevel');
     $this->_contextLevel = $contextLevel;
 }
开发者ID:NateWr,项目名称:omp,代码行数:9,代码来源:PluginLevelRequiredPolicy.inc.php

示例12:

 /**
  * Constructor
  * @param $stageId integer One of the WORKFLOW_STAGE_ID_* constants.
  */
 function __construct($stageId)
 {
     parent::__construct('user.authorization.workflowStageRequired');
     $this->_stageId = $stageId;
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:9,代码来源:WorkflowStageRequiredPolicy.inc.php

示例13:

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function __construct($request, $contextLevel)
 {
     parent::__construct();
     $this->_contextLevel =& $contextLevel;
 }
开发者ID:pkp,项目名称:ojs,代码行数:9,代码来源:PluginLevelRequiredPolicy.inc.php

示例14:

 /**
  * Constructor
  * @param $request PKPRequest
  */
 function __construct($request)
 {
     parent::__construct('user.authorization.monographAuthor');
     $this->_request =& $request;
 }
开发者ID:NateWr,项目名称:omp,代码行数:9,代码来源:MonographPublishedPolicy.inc.php


注:本文中的AuthorizationPolicy::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。