Exemple #1
0
 protected function beforeAction($event)
 {
     if (XOAD_Server::runServer()) {
         exit;
     }
     return true;
 }
Exemple #2
0
 public function runServer()
 {
     if (XOAD_Server::runServer()) {
         foreach (Yii::app()->log->routes as $route) {
             if ($route instanceof CWebLogRoute || $route instanceof YiiDebugToolbarRoute) {
                 $route->enabled = false;
             }
         }
         return true;
     }
     return false;
 }
Exemple #3
0
 function connector()
 {
     XOAD_Server::allowClasses('connector');
 }
Exemple #4
0
<?php

/**
 * XOAD_Cache Extension File.
 *
 * <p>This file initialized the XOAD_Cache extension
 * and installs all necessary server observers.</p>
 * <p>Note that this file is not included directly.
 * You should add the extension manually to the
 * extensions configuration file.</p>
 *
 * @author		Stanimir Angeloff
 *
 * @package		XOAD
 *
 * @subpackage	XOAD_Cache
 *
 * @version		0.6.0.0
 *
 */
/**
 * Loads the file that defines the {@link XOAD_Cache} class.
 */
require_once XOAD_CACHE_BASE . '/classes/Cache.class.php';
/**
 * Load the file that defines the XOAD_Cache Server observer.
 */
require_once XOAD_CACHE_BASE . '/classes/ServerObserver.class.php';
XOAD_Server::addObserver(new XOAD_Cache_ServerObserver());
Exemple #5
0
 public function startMapping()
 {
     XOAD_Server::allowClasses('Connector');
 }
Exemple #6
0
require_once 'inc/core/helpers.php';
require_once 'conf/init.php';
require_once xConfig::get('PATH', 'CORE') . 'core.php';
require_once xConfig::get('PATH', 'CORE') . 'helpers.tpl.php';
xRegistry::set('TMS', $TMS = new tMultiSection());
xPDO::setSource(DB_HOST, DB_NAME, DB_USER, DB_PASS);
xRegistry::set('xPDO', xPDO::getInstance());
xNameSpaceHolder::addObjectToNS('E', new ENHANCE());
require_once xConfig::get('PATH', 'XOAD') . 'xoad.php';
require_once xConfig::get('PATH', 'ADM') . 'logger.class.php';
require_once xConfig::get('PATH', 'ADM') . 'adm.class.php';
if ($_REQUEST['xoadCall']) {
    ob_start();
    $adm = new adminPanel();
    $adm->startMapping();
    if (XOAD_Server::runServer()) {
        $all = ob_get_contents();
        ob_end_clean();
        if ($_COMMON_SITE_CONF['output_html_compress']) {
            Common::compress_output($all);
        }
        echo $all;
        exit;
    }
} elseif ($_REQUEST['action']) {
    $adm = new adminPanel();
    echo $adm->dispatchAction($_GET['action']);
} else {
    $tpl = xCore::moduleFactory('templates.back');
    $adm = new adminPanel();
    //$data['xObject']=XOAD_Client::register(new adminPanel());
Exemple #7
0
<?php

/**
 * XOAD_HTML Extension File.
 *
 * <p>This file initialized the XOAD_HTML extension
 * and installs all necessary server observers.</p>
 * <p>Note that this file is not included directly.
 * You should add the extension manually to the
 * extensions configuration file.</p>
 *
 * @author		Stanimir Angeloff
 *
 * @package		XOAD
 *
 * @subpackage	XOAD_HTML
 *
 * @version		0.6.0.0
 *
 */
/**
 * Load the file that defines the XOAD_HTML Server observer.
 */
require_once XOAD_HTML_BASE . '/classes/ServerObserver.class.php';
/**
 * Loads the file that defines the {@link XOAD_HTML} class.
 */
require_once XOAD_HTML_BASE . '/classes/HTML.class.php';
XOAD_Server::addObserver(new XOAD_HTML_ServerObserver());
XOAD_Utilities::extensionHeader('html', 'js/html.js', 'js/html_optimized.js');
XOAD_Utilities::customHeader('/extensions/js/cssQuery.js');
Exemple #8
0
/**
 * Loads the class that is used as base class for all
 * XOAD Events storage providers.
 */
require_once XOAD_BASE . '/classes/events/Storage.class.php';
/**
 * Loads the class that is used to handle client callbacks.
 */
require_once XOAD_BASE . '/classes/Server.class.php';
if (!empty($xoadExtensions)) {
    foreach ($xoadExtensions as $extension) {
        /**
         * XOAD extension base folder that contains all extension files.
         */
        define('XOAD_' . strtoupper($extension) . '_BASE', XOAD_BASE . '/extensions/' . $extension);
        /**
         * Loads the main extension file.
         */
        require_once XOAD_BASE . '/extensions/' . $extension . '/' . $extension . '.ext.php';
    }
}
if (defined('XOAD_AUTOHANDLE')) {
    if (XOAD_AUTOHANDLE) {
        XOAD_Server::runServer();
        if (defined('XOAD_CALLBACK')) {
            if (XOAD_CALLBACK) {
                exit;
            }
        }
    }
}
Exemple #9
0
 /**
  * Throws a XOAD callback exception.
  *
  * @access	protected
  *
  * @param	string	$message	Exception message.
  *
  * @return	string	Outputs JavaString code that contains the
  *					exception message.
  *
  * @static
  *
  */
 public static function throwException($message)
 {
     if (!XOAD_Server::notifyObservers('throwExceptionEnter', array('message' => &$message))) {
         return false;
     }
     restore_error_handler();
     $callbackException = array();
     $callbackException['exception'] = $message;
     if (XOAD_Server::notifyObservers('throwExceptionLeave', array('message' => &$message))) {
         print XOAD_Client::register($callbackException);
     }
     return true;
 }
Exemple #10
0
 function start_mapping()
 {
     XOAD_Server::allowClasses('front_api');
 }