|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct () | |
| authorize ($request, &$args, $roleAssignments) | |
| get ($slimRequest, $response, $args) | |
| getAbstract ($slimRequest, $response, $args) | |
| getGalley ($slimRequest, $response, $args) | |
| getMany ($slimRequest, $response, $args) | |
| getManyAbstract ($slimRequest, $response, $args) | |
| getManyGalley ($slimRequest, $response, $args) | |
Public Member Functions inherited from APIHandler | |
| convertStringsToSchema ($schema, $params) | |
| getApp () | |
| getEndpointPattern () | |
| getEndpoints () | |
| getEntityId ($parameterName) | |
| getParameter ($parameterName, $default=null) | |
| getRequest () | |
| getSlimRequest () | |
| setSlimRequest ($slimRequest) | |
| setupEndpoints () | |
Public Member Functions inherited from PKPHandler | |
| addPolicy ($authorizationPolicy, $addToTop=false) | |
| addRoleAssignment ($roleIds, $operations) | |
| getApiToken () | |
| & | getAuthorizedContext () |
| & | getAuthorizedContextObject ($assocType) |
| & | getDispatcher () |
| getFirstUserContext ($user, $contexts) | |
| getId () | |
| getLastAuthorizationMessage () | |
| getRoleAssignment ($roleId) | |
| getRoleAssignments () | |
| getSiteRedirectContext ($request) | |
| getTargetContext ($request, &$contextsCount=null) | |
| index ($args, $request) | |
| initialize ($request) | |
| markRoleAssignmentsChecked () | |
| requireSSL () | |
| setApiToken ($apiToken) | |
| setDispatcher ($dispatcher) | |
| setEnforceRestrictedSite ($enforceRestrictedSite) | |
| setId ($id) | |
| setupTemplate ($request) | |
| validate ($requiredContexts=null, $request=null) | |
Protected Member Functions | |
| _processAllowedParams ($requestParams, $allowedParams) | |
| _processSearchPhrase ($searchPhrase, $submissionIds=[]) | |
Protected Member Functions inherited from APIHandler | |
| _validateStatDates ($params, $dateStartParam='dateStart', $dateEndParam='dateEnd') | |
Additional Inherited Members | |
Static Public Member Functions inherited from PKPHandler | |
| static | getPageParamName ($rangeName) |
| static | getRangeInfo ($request, $rangeName, $contextData=null) |
| static | hashPageContext ($request, $contextData=array()) |
Data Fields inherited from PKPHandler | |
| $_authorizationDecisionManager | |
| $_checks = array() | |
| $_dispatcher | |
| $_enforceRestrictedSite = true | |
| $_id | |
| $_isBackendPage = false | |
| $_roleAssignments = array() | |
| $_roleAssignmentsChecked = false | |
Protected Attributes inherited from APIHandler | |
| $_app | |
| $_endpoints = array() | |
| $_handlerPath = null | |
| $_pathPattern | |
| $_request | |
| $_slimRequest = null | |
Protected Attributes inherited from PKPHandler | |
| $_apiToken = null | |
Handle API requests for publication statistics.
Definition at line 22 of file PKPStatsPublicationHandler.inc.php.
| PKPStatsPublicationHandler::__construct | ( | ) |
Constructor
Reimplemented from APIHandler.
Definition at line 27 of file PKPStatsPublicationHandler.inc.php.
References APIHandler\getEndpointPattern().
|
protected |
A helper method to filter and sanitize the request params
Only allows the specified params through and enforces variable type where needed.
| array | $requestParams | |
| array | $allowedParams |
Definition at line 578 of file PKPStatsPublicationHandler.inc.php.
References PKPServices\get(), PKPHandler\getId(), and APIHandler\getRequest().
Referenced by get(), getAbstract(), getGalley(), getMany(), getManyAbstract(), and getManyGalley().
|
protected |
A helper method to get the submissionIds param when a searchPhase param is also passed.
If the searchPhrase and submissionIds params were both passed in the request, then we only return ids that match both conditions.
| string | $searchPhrase | |
| array | $submissionIds | List of allowed submission Ids |
Definition at line 638 of file PKPStatsPublicationHandler.inc.php.
References PKPServices\get(), PKPApplication\get(), PKPHandler\getId(), and APIHandler\getRequest().
Referenced by getMany(), getManyAbstract(), and getManyGalley().
| PKPStatsPublicationHandler::authorize | ( | $request, | |
| & | $args, | ||
| $roleAssignments | |||
| ) |
Authorize this request.
Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.
NB: This method will be called once for every request only.
| $request | Request |
| $args | array request arguments |
| $roleAssignments | array the operation role assignment, see getRoleAssignment() for more details. |
Reimplemented from PKPHandler.
Definition at line 70 of file PKPStatsPublicationHandler.inc.php.
References PKPHandler\addPolicy(), and APIHandler\getSlimRequest().
| PKPStatsPublicationHandler::get | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get a single publication's usage statistics
| $slimRequest | object Request Slim request |
| $response | object Response |
| $args | array |
Definition at line 388 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), and APIHandler\getRequest().
| PKPStatsPublicationHandler::getAbstract | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get the total abstract views for a set of publications broken down by month or day
| $slimRequest | Request Slim request object |
| $response | object Response |
| $args | array |
Definition at line 475 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), and APIHandler\getRequest().
| PKPStatsPublicationHandler::getGalley | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get the total galley views for a publication broken down by month or day
| $slimRequest | Request Slim request object |
| $response | object Response |
| $args | array |
Definition at line 526 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), and APIHandler\getRequest().
| PKPStatsPublicationHandler::getMany | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get usage stats for a set of publications
Returns total views by abstract, all galleys, pdf galleys, html galleys, and other galleys.
| $slimRequest | Request Slim request object |
| $response | object Response |
| $args | array |
Definition at line 107 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), _processSearchPhrase(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), PKPApplication\get(), DAORegistry\getDAO(), PKPHandler\getId(), and APIHandler\getRequest().
| PKPStatsPublicationHandler::getManyAbstract | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get the total abstract views for a set of publications in a timeline broken down month or day
| $slimRequest | Request Slim request object |
| $response | object Response |
| $args | array |
Definition at line 264 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), _processSearchPhrase(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), and APIHandler\getRequest().
| PKPStatsPublicationHandler::getManyGalley | ( | $slimRequest, | |
| $response, | |||
| $args | |||
| ) |
Get the total galley views for a set of publications in a timeline broken down month or day
| $slimRequest | Request Slim request object |
| $response | object Response |
| $args | array |
Definition at line 327 of file PKPStatsPublicationHandler.inc.php.
References _processAllowedParams(), _processSearchPhrase(), APIHandler\_validateStatDates(), HookRegistry\call(), PKPServices\get(), and APIHandler\getRequest().