- ⌂ web_launcher
- Static Methods
io_comand_package\web_launcher
The web launcher is invoked to launch a package when the package is discovered by the package router based on the requested URL.
The web launcher includes the index.php file in the package's root folder if it exists. It is up to the package's index.php file to determine what to do next. The COMAND API is already set up, so index.php does not need to require comand.php to access the API.
Before the web launcher delegates the request to a package, it defines the global $_COMAND variable, which contains two items:
- $_COMAND['REQUEST_URI'] - includes the portion of the URL that comes after the initial portion it used to route the request to the package.
- $_COMAND['PACKAGE_URI'] - includes the portion of the URL that comes after the initial portion it used to route the request to the package.
These make it easier for the package to inspect the remaining portion of the URL that it should be concerned with.
The full request URL is still accessible from the standard PHP $_SERVER['REQUEST_URI'].