Improve this Doc

App_Web

class App_Web

App_Web extends App_CLI to add basic Web handling. Here is a sample App_Web single-file application. Place the following code in myfile.php:

$app = new App_Web();
$app->add('LoremIpsum');

$app->main();   // executes render and outputs HTML

App_Web assumes that you will be using views and they will produce HTML.

Headers

App_Web::sendHeaders()

App_Web will send headers to the browsers automatically on init. Headers are always set to expire in the past and to prevent page caching.

App_Web::cleanMagicQuotes()

Reverses older PHP behavior which had magic quotes enabled.

Miscelanious

App_Web::showExecutionTime()

License Checking

If your configuration file contains Agile Toolkit certificate, Agile Toolkit will attempt to validate it.

Agile Toolkit framework can operate in commercial and open-source mode. If no certificate is present, it’s assumed that your installation of Agile Toolkit is not registered.

/sandbox will offer a user-friendly way to select and manage license.

Several other add-ons will rely valid license verification to perform properly.

App_Web::license()
App_Web::licenseCheck()

Default Controller

This application will automatically initialize:

  • Logger (pretty error logging and reporting)
  • PageManager (determining base URL and URL generation)
  • HTML Headers (uses no-cache headers by default)
  • A basic application template
  • Pages and routing (for handling HTTP requests).

Global Tags