|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct () | |
| 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) | |
| authorize ($request, &$args, $roleAssignments) | |
| 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 | |
| _validateStatDates ($params, $dateStartParam='dateStart', $dateEndParam='dateEnd') | |
Protected Attributes | |
| $_app | |
| $_endpoints = array() | |
| $_handlerPath = null | |
| $_pathPattern | |
| $_request | |
| $_slimRequest = null | |
Protected Attributes inherited from PKPHandler | |
| $_apiToken = null | |
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 | |
Base request API handler.
Definition at line 22 of file APIHandler.inc.php.
| APIHandler::__construct | ( | ) |
Constructor
Reimplemented from PKPHandler.
Reimplemented in PKPContextHandler, PKPSiteHandler, PKPStatsPublicationHandler, PKPBackendSubmissionsHandler, IssueHandler, PKPAnnouncementHandler, PKPStatsEditorialHandler, PKPStatsUserHandler, PKPSubmissionHandler, PKPUserHandler, PKPVocabHandler, BackendSubmissionsHandler, PKPBackendPaymentsSettingsHandler, SubmissionHandler, PKPEmailTemplateHandler, PKPUploadPublicFileHandler, and PKPTemporaryFilesHandler.
Definition at line 43 of file APIHandler.inc.php.
References PKPApplication\get(), getApp(), Config\getVar(), and setupEndpoints().
|
protected |
A helper method to validate start and end date params for stats API handlers
| array | $params | The params to validate |
| string | $dateStartParam | Where the find the start date in the array of params |
| string | $dateEndParam | Where to find the end date in the array of params |
Definition at line 396 of file APIHandler.inc.php.
References ValidatorFactory\make().
Referenced by PKPStatsUserHandler\get(), PKPStatsEditorialHandler\get(), PKPStatsPublicationHandler\get(), PKPStatsPublicationHandler\getAbstract(), PKPStatsPublicationHandler\getGalley(), PKPStatsPublicationHandler\getMany(), PKPStatsPublicationHandler\getManyAbstract(), and PKPStatsPublicationHandler\getManyGalley().
| APIHandler::convertStringsToSchema | ( | $schema, | |
| $params | |||
| ) |
Convert string values in boolean, integer and number parameters to their appropriate type when the string is in a recognizable format.
Converted booleans: False: "0", "false". True: "true", "1" Converted integers: Anything that passes ctype_digit() Converted floats: Anything that passes is_numeric()
Empty strings will be converted to null.
| $schema | string One of the SCHEMA_... constants |
| $params | array Key/value parameters to be validated |
Definition at line 281 of file APIHandler.inc.php.
References PKPServices\get().
Referenced by PKPAnnouncementHandler\add(), PKPEmailTemplateHandler\add(), PKPContextHandler\add(), PKPSubmissionHandler\add(), PKPSubmissionHandler\addPublication(), PKPSiteHandler\edit(), PKPAnnouncementHandler\edit(), PKPEmailTemplateHandler\edit(), PKPContextHandler\edit(), PKPSubmissionHandler\edit(), and PKPSubmissionHandler\editPublication().
| APIHandler::getApp | ( | ) |
Get the Slim application.
Definition at line 174 of file APIHandler.inc.php.
References $_app.
Referenced by __construct(), and setupEndpoints().
| APIHandler::getEndpointPattern | ( | ) |
Get the endpoint pattern for this handler
Compiles the URI path pattern from the context, api version and the unique string for the this handler.
Definition at line 186 of file APIHandler.inc.php.
References $_handlerPath, and $_pathPattern.
Referenced by PKPTemporaryFilesHandler\__construct(), PKPUploadPublicFileHandler\__construct(), PKPEmailTemplateHandler\__construct(), IssueHandler\__construct(), PKPAnnouncementHandler\__construct(), PKPStatsUserHandler\__construct(), PKPSubmissionHandler\__construct(), PKPVocabHandler\__construct(), PKPUserHandler\__construct(), PKPStatsEditorialHandler\__construct(), PKPSiteHandler\__construct(), PKPContextHandler\__construct(), and PKPStatsPublicationHandler\__construct().
| APIHandler::getEndpoints | ( | ) |
Returns the list of endpoints
Definition at line 231 of file APIHandler.inc.php.
References $_endpoints.
Referenced by setupEndpoints().
| APIHandler::getEntityId | ( | $parameterName | ) |
Get the entity ID for a specified parameter name. (Parameter names are generally defined in authorization policies
Definition at line 200 of file APIHandler.inc.php.
| APIHandler::getParameter | ( | $parameterName, | |
$default = null |
|||
| ) |
Fetches parameter value
| string | $parameterName | |
| mixed | $default |
Definition at line 243 of file APIHandler.inc.php.
References getSlimRequest().
| APIHandler::getRequest | ( | ) |
Return PKP request object
Definition at line 149 of file APIHandler.inc.php.
References $_request.
Referenced by PKPStatsPublicationHandler\_processAllowedParams(), PKPStatsPublicationHandler\_processSearchPhrase(), PKPAnnouncementHandler\add(), PKPEmailTemplateHandler\add(), PKPContextHandler\add(), PKPSubmissionHandler\add(), PKPSubmissionHandler\addPublication(), PKPBackendSubmissionsHandler\delete(), PKPAnnouncementHandler\delete(), PKPEmailTemplateHandler\delete(), PKPSubmissionHandler\delete(), PKPContextHandler\delete(), PKPSubmissionHandler\deletePublication(), PKPBackendPaymentsSettingsHandler\edit(), PKPSiteHandler\edit(), PKPAnnouncementHandler\edit(), PKPEmailTemplateHandler\edit(), PKPContextHandler\edit(), PKPSubmissionHandler\edit(), PKPSubmissionHandler\editPublication(), PKPSiteHandler\editTheme(), PKPContextHandler\editTheme(), PKPStatsUserHandler\get(), PKPStatsEditorialHandler\get(), PKPSiteHandler\get(), PKPAnnouncementHandler\get(), PKPUserHandler\get(), PKPEmailTemplateHandler\get(), PKPContextHandler\get(), IssueHandler\get(), PKPStatsPublicationHandler\get(), PKPStatsPublicationHandler\getAbstract(), PKPStatsEditorialHandler\getAverages(), IssueHandler\getCurrent(), PKPStatsPublicationHandler\getGalley(), PKPUserHandler\getMany(), PKPBackendSubmissionsHandler\getMany(), IssueHandler\getMany(), PKPEmailTemplateHandler\getMany(), PKPContextHandler\getMany(), PKPStatsPublicationHandler\getMany(), PKPAnnouncementHandler\getMany(), PKPStatsPublicationHandler\getManyAbstract(), PKPStatsPublicationHandler\getManyGalley(), PKPSubmissionHandler\getPublication(), PKPSubmissionHandler\getPublications(), PKPUserHandler\getReviewers(), PKPSiteHandler\getTheme(), PKPContextHandler\getTheme(), PKPSubmissionHandler\publishPublication(), PKPEmailTemplateHandler\restoreDefaults(), PKPSubmissionHandler\unpublishPublication(), PKPUploadPublicFileHandler\uploadFile(), PKPTemporaryFilesHandler\uploadFile(), and PKPSubmissionHandler\versionPublication().
| APIHandler::getSlimRequest | ( | ) |
Return Slim request object
Definition at line 158 of file APIHandler.inc.php.
References $_slimRequest.
Referenced by IssueHandler\authorize(), PKPStatsPublicationHandler\authorize(), PKPSubmissionHandler\authorize(), and getParameter().
| APIHandler::setSlimRequest | ( | $slimRequest | ) |
Set Slim request object
Definition at line 166 of file APIHandler.inc.php.
| APIHandler::setupEndpoints | ( | ) |
setup endpoints
Definition at line 208 of file APIHandler.inc.php.
References PKPHandler\addRoleAssignment(), HookRegistry\call(), getApp(), and getEndpoints().
Referenced by __construct().
|
protected |
Definition at line 23 of file APIHandler.inc.php.
Referenced by getApp().
|
protected |
Definition at line 25 of file APIHandler.inc.php.
Referenced by getEndpoints().
|
protected |
The unique endpoint string for this handler
Definition at line 38 of file APIHandler.inc.php.
Referenced by getEndpointPattern().
|
protected |
The endpoint pattern for this handler
Definition at line 32 of file APIHandler.inc.php.
Referenced by getEndpointPattern().
|
protected |
Definition at line 24 of file APIHandler.inc.php.
Referenced by getRequest().
|
protected |
Definition at line 26 of file APIHandler.inc.php.
Referenced by getSlimRequest().