PHP Classes
elePHPant
Icontem

File: najax.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stanimir Angeloff  >  NAJAX  >  najax.php  >  Download  
File: najax.php
Role: Example script
Content type: text/plain
Description: NAJAX all-in-one file. This file includes all classes that the NAJAX package contains and defines most of the constants.
Class: NAJAX
Call PHP class functions from page with Javascript
Author: By
Last change: NAJAX 0.4.0.0 Release
Date: 9 years ago
Size: 2,424 bytes
 

Contents

Class file image Download
<?php
/**
 * NAJAX all-in-one file.
 *
 * <p>This file includes all configuration files and
 * classes that the NAJAX package contains.</p>
 * <p>The file also includes all installed
 * extensions.</p>
 *
 * @author Stanimir Angeloff
 *
 * @package NAJAX
 *
 * @version 0.4.0.0
 *
 */

if ( ! defined('NAJAX_BASE')) {

   
/**
     * NAJAX base folder that contains all package files.
     */
   
define('NAJAX_BASE', dirname(__FILE__));
}

/**
 * Loads the NAJAX configuration file.
 */
require_once(NAJAX_BASE . '/config/najax.config.php');

/**
 * Loads the NAJAX extensions configuration file.
 */
require_once(NAJAX_BASE . '/config/extensions.config.php');

/**
 * Loads the file that defines the {@link NAJAX_Observer} Class.
 */
require_once(NAJAX_BASE . '/classes/Observer.class.php');

/**
 * Loads the class that is used to extend classes with events.
 */
require_once(NAJAX_BASE . '/classes/Observable.class.php');

/**
 * Loads the class that defines extended functions that
 * the NAJAX package uses and overrides some
 * deprecated functions, like gettype(...).
 */
require_once(NAJAX_BASE . '/classes/Utilities.class.php');

/**
 * Loads the class that is used to serialize a PHP variable
 * into a {@link http://www.json.org JSON} string.
 */
require_once(NAJAX_BASE . '/classes/Serializer.class.php');

/**
 * Loads the class that is used to register a PHP variable/class
 * in JavaScript.
 */
require_once(NAJAX_BASE . '/classes/Client.class.php');

/**
 * Loads the class that is used as base class for all
 * NACLES storage providers.
 */
require_once(NAJAX_BASE .'/classes/events/Storage.class.php');

/**
 * Loads the class that is used to handle client callbacks.
 */
require_once(NAJAX_BASE . '/classes/Server.class.php');

if ( ! empty(
$najaxExtensions)) {

    foreach (
$najaxExtensions as $extension) {

       
/**
         * NAJAX extension base folder that contains all extension files.
         */
       
define('NAJAX_' . strtoupper($extension) . '_BASE', NAJAX_BASE . '/extensions/' . $extension);

       
/**
         * Loads the main extension file.
         */
       
require_once(NAJAX_BASE . '/extensions/' . $extension . '/' . $extension . '.ext.php');
    }
}

if (
defined('NAJAX_AUTOHANDLE')) {

    if (
NAJAX_AUTOHANDLE) {

       
NAJAX_Server::runServer();

        if (
defined('NAJAX_CALLBACK')) {

            if (
NAJAX_CALLBACK) {

                exit;
            }
        }
    }
}
?>