Exemple #1
0
     */
    /**
     *  Returns a new instance of table class. For parameters @see table
     * 		@return table
     */
    public static function table($table, $id = FALSE, $columns = FALSE, $connection = FALSE)
    {
        if (!class_exists('table', FALSE)) {
            include_once 'table.php';
        }
        return new table($table, $id, $columns, $connection);
    }
    /**
     *	Sets up autoload, initializes some constants and starts session. 
     *		@public
     **/
    public static function start()
    {
        //	Use the rolisz autoload function
        spl_autoload_register(array('rolisz', 'autoload'));
        //dunno
        $root = rolisz::fixSlashes(realpath('.')) . '/';
        //Set a few site dependent framework variables
        self::$global = array('BASE' => preg_replace('/(.*)\\/.+/', '$1', $_SERVER['SCRIPT_NAME']), 'ENCODING' => 'UTF-8', 'ERROR' => NULL, 'QUIET' => FALSE, 'RELEASE' => FALSE, 'ROOT' => $root, 'SITEMAP' => array(), 'TIME' => time(), 'THROTTLE' => 0, 'VERSION' => self::AppName . ' ' . self::Version, 'AJAX' => isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest');
        self::$executionPoints = array('beforeMatch' => array(), 'afterMatch' => array(), 'hydrateTable' => array(), 'saveTable' => array(), 'deleteTable' => array(), 'compileTemplate' => array());
        session_start();
    }
}
// Initialize the framework
rolisz::start();