Gear::send PHP Method

send() public static method

public static send ( $errorReporting = E_ALL )
    public static function send($errorReporting = E_ALL)
    {
        try {
            echo new self($errorReporting);
        } catch (Resources\HttpException $e) {
            echo Resources\HttpException::outputError($e)->send();
        } catch (Resources\RunException $e) {
            echo Resources\RunException::main($e)->send();
        } catch (Exception $e) {
            echo Resources\RunException::main($e)->send();
        }
    }

Usage Example

Example #1
0
<?php

// Sets the default timezone used by all date/time. Adjust to your location
date_default_timezone_set('Asia/Jakarta');
// You can adjust this following constants if necessary.
// The APP constant is where your application folder located.
define('APP', dirname(__FILE__) . '/../app/');
// The INDEX_FILE constant is this default file name.
define('INDEX_FILE', basename(__FILE__));
// And the GEAR constant is where panada folder located.
define('GEAR', dirname(__DIR__) . '/panada/');
require_once GEAR . 'Gear.php';
// To sets which PHP errors are reported just like documented in this page
// http://php.net/manual/en/function.error-reporting.php
// You can pass a parameter into the Gear class.
// Turn off all errors reporting - production use.
// Gear::send(0);
// By default all errors will displayed - development use.
Gear::send();