Open Journal Systems
3.3.0
|
Public Member Functions | |
getEntity () | |
getRequestedOp ($request) | |
getVersion () | |
handleAuthorizationFailure ($request, $authorizationMessage) | |
route ($request) | |
supports ($request) | |
url ($request, $newContext=null, $endpoint=null, $op=null, $path=null, $params=null, $anchor=null, $escape=false) | |
![]() | |
__construct () | |
_authorizeInitializeAndCallRequest (&$serviceEndpoint, $request, &$args, $validate=true) | |
_contextLevelToContextName ($contextLevel) | |
_contextNameToContextLevel ($contextName) | |
_urlCanonicalizeNewContext ($newContext) | |
_urlFromParts ($baseUrl, $pathInfoArray=array(), $queryParametersArray=array(), $anchor='', $escape=false) | |
_urlGetAdditionalParameters ($request, $params=null, $escape=true) | |
_urlGetBaseAndContext ($request, $newContext=array()) | |
& | getApplication () |
getCacheFilename ($request) | |
& | getContext ($request, $requestedContextLevel=1, $forceReload=false) |
& | getContextByName ($request, $requestedContextName) |
& | getDispatcher () |
getHandler () | |
getIndexUrl ($request) | |
getRequestedContextPath ($request, $requestedContextLevel=1) | |
getRequestedContextPaths ($request) | |
isCacheable ($request) | |
setApplication ($application) | |
setDispatcher ($dispatcher) | |
setHandler ($handler) | |
Protected Member Functions | |
getPathInfoParts () | |
Additional Inherited Members | |
![]() | |
$_application | |
$_contextDepth | |
$_contextList | |
$_contextPaths = array() | |
$_contexts = array() | |
$_dispatcher | |
$_flippedContextList | |
$_handler | |
Map HTTP requests to a REST API using the Slim microframework.
Requests for [index.php]/api are intercepted for site-level API requests, and requests for [index.php]/{contextPath}/api are intercepted for context-level API requests.
Definition at line 24 of file APIRouter.inc.php.
APIRouter::getEntity | ( | ) |
Get the entity being requested
Definition at line 80 of file APIRouter.inc.php.
References Core\cleanFileVar(), and getPathInfoParts().
Referenced by route().
|
protected |
Determines path info parts depending of disable_path_info config value
Definition at line 30 of file APIRouter.inc.php.
References PKPRouter\getApplication(), and Config\getVar().
Referenced by getEntity(), getVersion(), and supports().
APIRouter::getRequestedOp | ( | $request | ) |
Get the requested operation
$request | PKPRequest |
Definition at line 124 of file APIRouter.inc.php.
References PKPRouter\getHandler().
APIRouter::getVersion | ( | ) |
Get the API version
Definition at line 71 of file APIRouter.inc.php.
References Core\cleanFileVar(), and getPathInfoParts().
Referenced by route().
APIRouter::handleAuthorizationFailure | ( | $request, | |
$authorizationMessage | |||
) |
Handle an authorization failure.
$request | Request |
$authorizationMessage | string a translation key with the authorization failure message. |
Reimplemented from PKPRouter.
Definition at line 142 of file APIRouter.inc.php.
References AppLocale\requireComponents().
APIRouter::route | ( | $request | ) |
Routes a given request to a handler operation
$request | PKPRequest |
Reimplemented from PKPRouter.
Definition at line 91 of file APIRouter.inc.php.
References getEntity(), SessionManager\getManager(), getVersion(), AppLocale\requireComponents(), and PKPRouter\setHandler().
APIRouter::supports | ( | $request | ) |
Determines whether this router can route the given request.
$request | PKPRequest |
Reimplemented from PKPRouter.
Definition at line 56 of file APIRouter.inc.php.
References getPathInfoParts().
APIRouter::url | ( | $request, | |
$newContext = null , |
|||
$endpoint = null , |
|||
$op = null , |
|||
$path = null , |
|||
$params = null , |
|||
$anchor = null , |
|||
$escape = false |
|||
) |
Build a handler request URL into PKPApplication.
$request | PKPRequest the request to be routed |
$newContext | mixed Optional contextual paths |
$handler | string Optional name of the handler to invoke |
$op | string Optional name of operation to invoke |
$path | mixed Optional string or array of args to pass to handler |
$params | array Optional set of name => value pairs to pass as user parameters |
$anchor | string Optional name of anchor to add to URL |
$escape | boolean Whether or not to escape ampersands, square brackets, etc. for this URL; default false. |
Reimplemented from PKPRouter.
Definition at line 156 of file APIRouter.inc.php.
References $op, PKPRouter\_urlCanonicalizeNewContext(), PKPRouter\_urlFromParts(), PKPRouter\_urlGetAdditionalParameters(), and PKPRouter\_urlGetBaseAndContext().