is_ajax |
In order for the system to bootstrap the same way for both page
and ajax requests, there needs to be a switch to determine which
kind of request it is, so the correct controller can be loaded
to handle the request. Oroboros uses the standard HTTP ajax header:
X-Requested-With=XMLHttpRequest. |
is_cli |
It is common for scripts to crash if the wrong output headers
are sent when a script runs from the command line. This function
will return a simple boolean, allowing you to easily check for this. |
localize_url |
This will return a URL based on the current
hostname, relative to the Oroboros Core base. |
oroboros_classfile_to_classname |
This will only work on files within the oroboros directory.
Returns [false] if either of: File not found OR outside of oroboros directory. |
oroboros_run_routine |
Runs a valid procedural routine within the Oroboros core system.
Does not return any output. If the routine is not valid, throws
an Exception. If the routine runs, but produces an
exception or error, it will be caught and replaced with an
\OroborosRoutineException, providing the original exception
as the third parameter. |
request_headers |
|
require_safely |
Safely requires a file that should only be included once. If already loaded,
this function will simply return false. If file does not exist, will throw an
exception instead of an error, making it catcheable even if error mode is not
set to exception. |