Open Journal Systems  3.3.0
PKPStatsPublicationHandler.inc.php
1 <?php
2 
17 import('lib.pkp.classes.handler.APIHandler');
18 import('classes.core.Services');
19 import('classes.statistics.StatisticsHelper');
20 import('lib.pkp.classes.submission.PKPSubmission'); // import STATUS_ constants
21 
22 abstract class PKPStatsPublicationHandler extends APIHandler {
23 
27  public function __construct() {
28  $this->_handlerPath = 'stats/publications';
29  $roles = array(ROLE_ID_SITE_ADMIN, ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR);
30  $this->_endpoints = array(
31  'GET' => array (
32  array(
33  'pattern' => $this->getEndpointPattern(),
34  'handler' => array($this, 'getMany'),
35  'roles' => $roles
36  ),
37  array(
38  'pattern' => $this->getEndpointPattern() . '/abstract',
39  'handler' => array($this, 'getManyAbstract'),
40  'roles' => $roles
41  ),
42  array(
43  'pattern' => $this->getEndpointPattern() . '/galley',
44  'handler' => array($this, 'getManyGalley'),
45  'roles' => $roles
46  ),
47  array(
48  'pattern' => $this->getEndpointPattern() . '/{submissionId}',
49  'handler' => array($this, 'get'),
50  'roles' => $roles
51  ),
52  array(
53  'pattern' => $this->getEndpointPattern() . '/{submissionId}/abstract',
54  'handler' => array($this, 'getAbstract'),
55  'roles' => $roles
56  ),
57  array(
58  'pattern' => $this->getEndpointPattern() . '/{submissionId}/galley',
59  'handler' => array($this, 'getGalley'),
60  'roles' => $roles
61  ),
62  ),
63  );
64  parent::__construct();
65  }
66 
67  //
68  // Implement methods from PKPHandler
69  //
70  function authorize($request, &$args, $roleAssignments) {
71  $routeName = null;
72  $slimRequest = $this->getSlimRequest();
73 
74  import('lib.pkp.classes.security.authorization.ContextAccessPolicy');
75  $this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
76 
77  import('lib.pkp.classes.security.authorization.PolicySet');
78  $rolePolicy = new PolicySet(COMBINING_PERMIT_OVERRIDES);
79  import('lib.pkp.classes.security.authorization.RoleBasedHandlerOperationPolicy');
80  foreach ($roleAssignments as $role => $operations) {
81  $rolePolicy->addPolicy(new RoleBasedHandlerOperationPolicy($request, $role, $operations));
82  }
83  $this->addPolicy($rolePolicy);
84 
85  if (!is_null($slimRequest) && ($route = $slimRequest->getAttribute('route'))) {
86  $routeName = $route->getName();
87  }
88  if (in_array($routeName, ['get', 'getAbstract', 'getGalley'])) {
89  import('lib.pkp.classes.security.authorization.SubmissionAccessPolicy');
90  $this->addPolicy(new SubmissionAccessPolicy($request, $args, $roleAssignments));
91  }
92 
93  return parent::authorize($request, $args, $roleAssignments);
94  }
95 
107  public function getMany($slimRequest, $response, $args) {
108  $request = $this->getRequest();
109 
110  if (!$request->getContext()) {
111  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
112  }
113 
114  $defaultParams = [
115  'count' => 30,
116  'offset' => 0,
117  'orderDirection' => STATISTICS_ORDER_DESC,
118  ];
119 
120  $requestParams = array_merge($defaultParams, $slimRequest->getQueryParams());
121 
122  $allowedParams = $this->_processAllowedParams($requestParams, [
123  'dateStart',
124  'dateEnd',
125  'count',
126  'offset',
127  'orderDirection',
128  'searchPhrase',
129  $this->sectionIdsQueryParam,
130  'submissionIds',
131  ]);
132 
133  $allowedParams['contextIds'] = $request->getContext()->getId();
134 
135  \HookRegistry::call('API::stats::publications::params', array(&$allowedParams, $slimRequest));
136 
137  $result = $this->_validateStatDates($allowedParams);
138  if ($result !== true) {
139  return $response->withStatus(400)->withJsonError($result);
140  }
141 
142  if (!in_array($allowedParams['orderDirection'], [STATISTICS_ORDER_ASC, STATISTICS_ORDER_DESC])) {
143  return $response->withStatus(400)->withJsonError('api.stats.400.invalidOrderDirection');
144  }
145 
146  // Identify submissions which should be included in the results when a searchPhrase is passed
147  if (!empty($allowedParams['searchPhrase'])) {
148  $allowedSubmissionIds = empty($allowedParams['submissionIds']) ? [] : $allowedParams['submissionIds'];
149  $allowedParams['submissionIds'] = $this->_processSearchPhrase($allowedParams['searchPhrase'], $allowedSubmissionIds);
150 
151  if (empty($allowedParams['submissionIds'])) {
152  return $response->withJson([
153  'items' => [],
154  'itemsMax' => 0,
155  ], 200);
156  }
157  }
158 
159  // Get a list of top publications by total abstract and file views
160  $statsService = \Services::get('stats');
161  $totals = $statsService->getOrderedObjects(STATISTICS_DIMENSION_SUBMISSION_ID, $allowedParams['orderDirection'], array_merge($allowedParams, [
162  'assocTypes' => [ASSOC_TYPE_SUBMISSION, ASSOC_TYPE_SUBMISSION_FILE]
163  ]));
164 
165  // Get the stats for each publication
166  $items = [];
167  foreach ($totals as $total) {
168  if (empty($total['id'])) {
169  continue;
170  }
171 
172  $galleyRecords = $statsService->getRecords(array_merge($allowedParams, [
173  'assocTypes' => ASSOC_TYPE_SUBMISSION_FILE,
174  'submissionIds' => [$total['id']],
175  ]));
176 
177  // Get the galley totals for each file type (pdf, html, other)
178  $galleyViews = array_reduce($galleyRecords, [$statsService, 'sumMetric'], 0);
179  $pdfViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordPdf']), [$statsService, 'sumMetric'], 0);
180  $htmlViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordHtml']), [$statsService, 'sumMetric'], 0);
181  $otherViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordOther']), [$statsService, 'sumMetric'], 0);
182 
183  // Get the abstract records
184  $abstractRecords = $statsService->getRecords(array_merge($allowedParams, [
185  'assocTypes' => ASSOC_TYPE_SUBMISSION,
186  'submissionIds' => [$total['id']],
187  ]));
188  $abstractViews = array_reduce($abstractRecords, [$statsService, 'sumMetric'], 0);
189 
190  // Get the publication
191  $submission = \Services::get('submission')->get($total['id']);
192  $getPropertiesArgs = [
193  'request' => $request,
194  'slimRequest' => $slimRequest,
195  ];
196  // Stats may still exist for deleted publications
197  $submissionProps = ['id' => $total['id']];
198  if ($submission) {
199  $submissionProps = \Services::get('submission')->getProperties(
200  $submission,
201  [
202  '_href',
203  'id',
204  'urlWorkflow',
205  'urlPublished',
206  ],
207  $getPropertiesArgs
208  );
209  $submissionProps = array_merge(
210  $submissionProps,
211  \Services::get('publication')->getProperties(
212  $submission->getCurrentPublication(),
213  [
214  'authorsStringShort',
215  'fullTitle',
216  ],
217  $getPropertiesArgs
218  )
219  );
220  }
221 
222  $items[] = [
223  'abstractViews' => $abstractViews,
224  'galleyViews' => $galleyViews,
225  'pdfViews' => $pdfViews,
226  'htmlViews' => $htmlViews,
227  'otherViews' => $otherViews,
228  'publication' => $submissionProps,
229  ];
230  }
231 
232  // Get a count of all submission ids that have stats matching this request
233  $statsQB = new \PKP\Services\QueryBuilders\PKPStatsQueryBuilder();
234  $statsQB
235  ->filterByContexts(\Application::get()->getRequest()->getContext()->getId())
236  ->before(isset($allowedParams['dateEnd']) ? $allowedParams['dateEnd'] : STATISTICS_YESTERDAY)
237  ->after(isset($allowedParams['dateStart']) ? $allowedParams['dateStart'] : STATISTICS_EARLIEST_DATE);
238  if (isset($allowedParams[$this->sectionIdsQueryParam])) {
239  $statsQB->filterBySections($allowedParams[$this->sectionIdsQueryParam]);
240  }
241  if (isset($allowedParams['submissionIds'])) {
242  $statsQB->filterBySubmissions($allowedParams['submissionIds']);
243  }
244  $statsQO = $statsQB->getSubmissionIds();
245  $result = \DAORegistry::getDAO('MetricsDAO')
246  ->retrieve($statsQO->toSql(), $statsQO->getBindings());
247  $itemsMax = $result->RecordCount();
248 
249  return $response->withJson([
250  'items' => $items,
251  'itemsMax' => $itemsMax,
252  ], 200);
253  }
254 
264  public function getManyAbstract($slimRequest, $response, $args) {
265  $request = $this->getRequest();
266 
267  if (!$request->getContext()) {
268  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
269  }
270 
271  $defaultParams = [
272  'timelineInterval' => STATISTICS_DIMENSION_MONTH,
273  ];
274 
275  $requestParams = array_merge($defaultParams, $slimRequest->getQueryParams());
276 
277  $allowedParams = $this->_processAllowedParams($requestParams, [
278  'dateStart',
279  'dateEnd',
280  'timelineInterval',
281  'searchPhrase',
282  $this->sectionIdsQueryParam,
283  'submissionIds',
284  ]);
285 
286  \HookRegistry::call('API::stats::publications::abstract::params', array(&$allowedParams, $slimRequest));
287 
288  if (!in_array($allowedParams['timelineInterval'], [STATISTICS_DIMENSION_DAY, STATISTICS_DIMENSION_MONTH])) {
289  return $response->withStatus(400)->withJsonError('api.stats.400.wrongTimelineInterval');
290  }
291 
292  $result = $this->_validateStatDates($allowedParams);
293  if ($result !== true) {
294  return $response->withStatus(400)->withJsonError($result);
295  }
296 
297  $allowedParams['contextIds'] = $request->getContext()->getId();
298  $allowedParams['assocTypes'] = ASSOC_TYPE_SUBMISSION;
299 
300  // Identify submissions which should be included in the results when a searchPhrase is passed
301  if (!empty($allowedParams['searchPhrase'])) {
302  $allowedSubmissionIds = empty($allowedParams['submissionIds']) ? [] : $allowedParams['submissionIds'];
303  $allowedParams['submissionIds'] = $this->_processSearchPhrase($allowedParams['searchPhrase'], $allowedSubmissionIds);
304 
305  if (empty($allowedParams['submissionIds'])) {
306  $dateStart = empty($allowedParams['dateStart']) ? STATISTICS_EARLIEST_DATE : $allowedParams['dateStart'];
307  $dateEnd = empty($allowedParams['dateEnd']) ? date('Ymd', strtotime('yesterday')) : $allowedParams['dateEnd'];
308  $emptyTimeline = \Services::get('stats')->getEmptyTimelineIntervals($dateStart, $dateEnd, $allowedParams['timelineInterval']);
309  return $response->withJson($emptyTimeline, 200);
310  }
311  }
312 
313  $data = \Services::get('stats')->getTimeline($allowedParams['timelineInterval'], $allowedParams);
314 
315  return $response->withJson($data, 200);
316  }
317 
327  public function getManyGalley($slimRequest, $response, $args) {
328  $request = $this->getRequest();
329 
330  if (!$request->getContext()) {
331  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
332  }
333 
334  $defaultParams = [
335  'timelineInterval' => STATISTICS_DIMENSION_MONTH,
336  ];
337 
338  $requestParams = array_merge($defaultParams, $slimRequest->getQueryParams());
339 
340  $allowedParams = $this->_processAllowedParams($requestParams, [
341  'dateStart',
342  'dateEnd',
343  'timelineInterval',
344  'searchPhrase',
345  $this->sectionIdsQueryParam,
346  'submissionIds',
347  ]);
348 
349  \HookRegistry::call('API::stats::publications::galley::params', array(&$allowedParams, $slimRequest));
350 
351  if (!in_array($allowedParams['timelineInterval'], [STATISTICS_DIMENSION_DAY, STATISTICS_DIMENSION_MONTH])) {
352  return $response->withStatus(400)->withJsonError('api.stats.400.wrongTimelineInterval');
353  }
354 
355  $result = $this->_validateStatDates($allowedParams);
356  if ($result !== true) {
357  return $response->withStatus(400)->withJsonError($result);
358  }
359 
360  $allowedParams['contextIds'] = $request->getContext()->getId();
361  $allowedParams['assocTypes'] = ASSOC_TYPE_SUBMISSION_FILE;
362 
363  // Identify submissions which should be included in the results when a searchPhrase is passed
364  if (!empty($allowedParams['searchPhrase'])) {
365  $allowedSubmissionIds = empty($allowedParams['submissionIds']) ? [] : $allowedParams['submissionIds'];
366  $allowedParams['submissionIds'] = $this->_processSearchPhrase($allowedParams['searchPhrase'], $allowedSubmissionIds);
367 
368  if (empty($allowedParams['submissionIds'])) {
369  $dateStart = empty($allowedParams['dateStart']) ? STATISTICS_EARLIEST_DATE : $allowedParams['dateStart'];
370  $dateEnd = empty($allowedParams['dateEnd']) ? date('Ymd', strtotime('yesterday')) : $allowedParams['dateEnd'];
371  $emptyTimeline = \Services::get('stats')->getEmptyTimelineIntervals($dateStart, $dateEnd, $allowedParams['timelineInterval']);
372  return $response->withJson($emptyTimeline, 200);
373  }
374  }
375 
376  $data = \Services::get('stats')->getTimeline($allowedParams['timelineInterval'], $allowedParams);
377 
378  return $response->withJson($data, 200);
379  }
380 
388  public function get($slimRequest, $response, $args) {
389  $request = $this->getRequest();
390 
391  if (!$request->getContext()) {
392  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
393  }
394 
395  $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
396 
397  $allowedParams = $this->_processAllowedParams($slimRequest->getQueryParams(), [
398  'dateStart',
399  'dateEnd',
400  ]);
401 
402  \HookRegistry::call('API::stats::publication::params', array(&$allowedParams, $slimRequest));
403 
404  $result = $this->_validateStatDates($allowedParams);
405  if ($result !== true) {
406  return $response->withStatus(400)->withJsonError($result);
407  }
408 
409  $allowedParams['submissionIds'] = [$submission->getId()];
410  $allowedParams['contextIds'] = $request->getContext()->getId();
411 
412  $statsService = Services::get('stats');
413 
414  $abstractRecords = $statsService->getRecords(array_merge($allowedParams, [
415  'assocTypes' => [ASSOC_TYPE_SUBMISSION],
416  ]));
417  $abstractViews = array_reduce($abstractRecords, [$statsService, 'sumMetric'], 0);
418 
419  // Get the galley totals for each file type (pdf, html, other)
420  $galleyRecords = $statsService->getRecords(array_merge($allowedParams, [
421  'assocTypes' => [ASSOC_TYPE_SUBMISSION_FILE],
422  ]));
423  $galleyViews = array_reduce($galleyRecords, [$statsService, 'sumMetric'], 0);
424  $pdfViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordPdf']), [$statsService, 'sumMetric'], 0);
425  $htmlViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordHtml']), [$statsService, 'sumMetric'], 0);
426  $otherViews = array_reduce(array_filter($galleyRecords, [$statsService, 'filterRecordOther']), [$statsService, 'sumMetric'], 0);
427 
428  $submissionProps = Services::get('submission')->getProperties(
429  $submission,
430  [
431  '_href',
432  'id',
433  'urlWorkflow',
434  'urlPublished',
435  ],
436  [
437  'request' => $request,
438  'slimRequest' => $slimRequest,
439  ]
440  );
441  $submissionProps = array_merge(
442  $submissionProps,
443  Services::get('publication')->getProperties(
444  $submission->getCurrentPublication(),
445  [
446  'authorsStringShort',
447  'fullTitle',
448  ],
449  [
450  'request' => $request,
451  'slimRequest' => $slimRequest,
452  ]
453  )
454  );
455 
456  return $response->withJson([
457  'abstractViews' => $abstractViews,
458  'galleyViews' => $galleyViews,
459  'pdfViews' => $pdfViews,
460  'htmlViews' => $htmlViews,
461  'otherViews' => $otherViews,
462  'publication' => $submissionProps,
463  ], 200);
464  }
465 
475  public function getAbstract($slimRequest, $response, $args) {
476  $request = $this->getRequest();
477 
478  if (!$request->getContext()) {
479  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
480  }
481 
482  $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
483  if (!$submission) {
484  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
485  }
486 
487  $defaultParams = [
488  'timelineInterval' => STATISTICS_DIMENSION_MONTH,
489  ];
490 
491  $requestParams = array_merge($defaultParams, $slimRequest->getQueryParams());
492 
493  $allowedParams = $this->_processAllowedParams($requestParams, [
494  'dateStart',
495  'dateEnd',
496  'timelineInterval',
497  ]);
498 
499  $allowedParams['contextIds'] = $request->getContext()->getId();
500  $allowedParams['submissionIds'] = $submission->getId();
501  $allowedParams['assocTypes'] = ASSOC_TYPE_SUBMISSION;
502  $allowedParams['assocIds'] = $submission->getId();
503 
504  \HookRegistry::call('API::stats::publication::abstract::params', array(&$allowedParams, $slimRequest));
505 
506  $result = $this->_validateStatDates($allowedParams);
507  if ($result !== true) {
508  return $response->withStatus(400)->withJsonError($result);
509  }
510 
511  $statsService = \Services::get('stats');
512  $data = $statsService->getTimeline($allowedParams['timelineInterval'], $allowedParams);
513 
514  return $response->withJson($data, 200);
515  }
516 
526  public function getGalley($slimRequest, $response, $args) {
527  $request = $this->getRequest();
528 
529 
530  if (!$request->getContext()) {
531  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
532  }
533 
534  $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
535  if (!$submission) {
536  return $response->withStatus(404)->withJsonError('api.404.resourceNotFound');
537  }
538 
539  $defaultParams = [
540  'timelineInterval' => STATISTICS_DIMENSION_MONTH,
541  ];
542 
543  $requestParams = array_merge($defaultParams, $slimRequest->getQueryParams());
544 
545  $allowedParams = $this->_processAllowedParams($requestParams, [
546  'dateStart',
547  'dateEnd',
548  'timelineInterval',
549  ]);
550 
551  $allowedParams['contextIds'] = $request->getContext()->getId();
552  $allowedParams['submissionIds'] = $submission->getId();
553  $allowedParams['assocTypes'] = ASSOC_TYPE_SUBMISSION_FILE;
554 
555  \HookRegistry::call('API::stats::publication::galley::params', array(&$allowedParams, $slimRequest));
556 
557  $result = $this->_validateStatDates($allowedParams);
558  if ($result !== true) {
559  return $response->withStatus(400)->withJsonError($result);
560  }
561 
562  $statsService = \Services::get('stats');
563  $data = $statsService->getTimeline($allowedParams['timelineInterval'], $allowedParams);
564 
565  return $response->withJson($data, 200);
566  }
567 
578  protected function _processAllowedParams($requestParams, $allowedParams) {
579 
580  $returnParams = [];
581  foreach ($requestParams as $requestParam => $value) {
582  if (!in_array($requestParam, $allowedParams)) {
583  continue;
584  }
585  switch ($requestParam) {
586  case 'dateStart':
587  case 'dateEnd':
588  case 'timelineInterval':
589  case 'searchPhrase':
590  $returnParams[$requestParam] = $value;
591  break;
592 
593  case 'count':
594  $returnParams[$requestParam] = min(100, (int) $value);
595  break;
596 
597  case 'offset':
598  $returnParams[$requestParam] = (int) $value;
599  break;
600 
601  case 'orderDirection':
602  $returnParams[$requestParam] = strtoupper($value);
603  break;
604 
605  case $this->sectionIdsQueryParam:
606  case 'submissionIds':
607  if (is_string($value) && strpos($value, ',') > -1) {
608  $value = explode(',', $value);
609  } elseif (!is_array($value)) {
610  $value = array($value);
611  }
612  $returnParams[$requestParam] = array_map('intval', $value);
613  break;
614 
615  }
616  }
617 
618  // Get the earliest date of publication if no start date set
619  if (in_array('dateStart', $allowedParams) && !isset($returnParams['dateStart'])) {
620  $dateRange = Services::get('publication')->getDateBoundaries(['contextIds' => $this->getRequest()->getContext()->getId()]);
621  $returnParams['dateStart'] = $dateRange[0];
622  }
623 
624  return $returnParams;
625  }
626 
638  protected function _processSearchPhrase($searchPhrase, $submissionIds = []) {
639  $searchPhraseSubmissionIds = \Services::get('submission')->getIds([
640  'contextId' => \Application::get()->getRequest()->getContext()->getId(),
641  'searchPhrase' => $searchPhrase,
642  'status' => STATUS_PUBLISHED,
643  ]);
644 
645  if (!empty($submissionIds)) {
646  $submissionIds = array_intersect($submissionIds, $searchPhraseSubmissionIds);
647  } else {
648  $submissionIds = $searchPhraseSubmissionIds;
649  }
650 
651  return $submissionIds;
652  }
653 }
ContextAccessPolicy
Class to control access to PKP applications' setup components.
Definition: ContextAccessPolicy.inc.php:17
PKPStatsPublicationHandler\getManyAbstract
getManyAbstract($slimRequest, $response, $args)
Definition: PKPStatsPublicationHandler.inc.php:264
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
APIHandler\_validateStatDates
_validateStatDates($params, $dateStartParam='dateStart', $dateEndParam='dateEnd')
Definition: APIHandler.inc.php:396
PKPHandler\getId
getId()
Definition: PKPHandler.inc.php:107
PKPStatsPublicationHandler
Handle API requests for publication statistics.
Definition: PKPStatsPublicationHandler.inc.php:22
PKPStatsPublicationHandler\getGalley
getGalley($slimRequest, $response, $args)
Definition: PKPStatsPublicationHandler.inc.php:526
APIHandler\getSlimRequest
getSlimRequest()
Definition: APIHandler.inc.php:158
APIHandler
Base request API handler.
Definition: APIHandler.inc.php:22
PKPStatsPublicationHandler\__construct
__construct()
Definition: PKPStatsPublicationHandler.inc.php:27
PKPHandler\getAuthorizedContextObject
& getAuthorizedContextObject($assocType)
Definition: PKPHandler.inc.php:174
PKPStatsPublicationHandler\getAbstract
getAbstract($slimRequest, $response, $args)
Definition: PKPStatsPublicationHandler.inc.php:475
PKPStatsPublicationHandler\authorize
authorize($request, &$args, $roleAssignments)
Definition: PKPStatsPublicationHandler.inc.php:70
PKPStatsPublicationHandler\_processSearchPhrase
_processSearchPhrase($searchPhrase, $submissionIds=[])
Definition: PKPStatsPublicationHandler.inc.php:638
RoleBasedHandlerOperationPolicy
Class to control access to handler operations via role based access control.
Definition: RoleBasedHandlerOperationPolicy.inc.php:18
PKPStatsPublicationHandler\getMany
getMany($slimRequest, $response, $args)
Definition: PKPStatsPublicationHandler.inc.php:107
PKPApplication\get
static get()
Definition: PKPApplication.inc.php:235
APIHandler\getRequest
getRequest()
Definition: APIHandler.inc.php:149
PKPStatsPublicationHandler\getManyGalley
getManyGalley($slimRequest, $response, $args)
Definition: PKPStatsPublicationHandler.inc.php:327
SubmissionAccessPolicy
Base class to control (write) access to submissions and (read) access to submission details in OMP.
Definition: SubmissionAccessPolicy.inc.php:19
PKPHandler\addPolicy
addPolicy($authorizationPolicy, $addToTop=false)
Definition: PKPHandler.inc.php:157
APIHandler\getEndpointPattern
getEndpointPattern()
Definition: APIHandler.inc.php:186
HookRegistry\call
static call($hookName, $args=null)
Definition: HookRegistry.inc.php:86
PolicySet
An ordered list of policies. Policy sets can be added to decision managers like policies....
Definition: PolicySet.inc.php:26
PKPStatsPublicationHandler\_processAllowedParams
_processAllowedParams($requestParams, $allowedParams)
Definition: PKPStatsPublicationHandler.inc.php:578
PKPServices\get
static get($service)
Definition: PKPServices.inc.php:49