Tsugi

Router
in package

Maps the first /api/ path segment to the class that used to be that script.

Table of Contents

Methods

dispatch()  : void
notFound()  : void
presentAs()  : void
Annotate and stickygrader used to run as index.php inside their own folders. rest_path() takes the controller from SCRIPT_NAME's directory, and the navigation check exempts a script directory of exactly "api" (it reads SCRIPT_FILENAME). Both have to keep looking like the old index.php or a tool session would be accepted and the session id in the path would be parsed as the word "annotate".

Methods

dispatch()

public static dispatch(string $name) : void
Parameters
$name : string

notFound()

private static notFound() : void

presentAs()

Annotate and stickygrader used to run as index.php inside their own folders. rest_path() takes the controller from SCRIPT_NAME's directory, and the navigation check exempts a script directory of exactly "api" (it reads SCRIPT_FILENAME). Both have to keep looking like the old index.php or a tool session would be accepted and the session id in the path would be parsed as the word "annotate".

private static presentAs(string $folder) : void
Parameters
$folder : string

        
On this page

Search results