Integrating into your application - TitaniaDev/Titania-Web-Application-Firmware GitHub Wiki
Titania's Web Application Framework was initially developed for Titania's applications, but it has since become public domain. Adding the framework to your application is very simple.
Create a framework directory
The first step is creating a directory in the root of your application dedicated to the framework. You can call it whatever you want — most developers name it "framework".
You should download the latest release and unpack the bin and src directories into your dedicated framework folder.
Including the framework in your application
The next step is including the framework in your application. To do this, you should ensure that the /bin/Main.php file is included at the very beginning of each request, before any other code is ran.
require "framework/bin/Main.php";
Replace framework
with the path to your dedicated framework directory. The above code should run before ANY other code is executed.
Alter existing code
Congratulations, you've hooked the framework into your application. If you've already developed your application, you'll need to make adjustments to your own code:
- Remove any session_start() or ob_start() lines. Output buffering and sessions are started automatically.
- Optionally, begin using the MySQL driver to perform SQL transactions.
- Start using the Network driver to perform HTTP requests.
Use the API
You're finished. Now you can begin using the API.