Beispiel #1
0
 private function setupXApp($conf)
 {
     if (!defined(XAPP_PATH_BASE)) {
         define(XAPP_PATH_BASE, XAPP_BASEDIR);
     }
     if ($conf == null) {
         $conf = array(XAPP_CONF_DEBUG_MODE => null, XAPP_CONF_AUTOLOAD => false, XAPP_CONF_DEV_MODE => XApp_Service_Entry_Utils::isDebug(), XAPP_CONF_HANDLE_BUFFER => true, XAPP_CONF_HANDLE_SHUTDOWN => false, XAPP_CONF_HTTP_GZIP => true, XAPP_CONF_CONSOLE => false, XAPP_CONF_HANDLE_ERROR => true, XAPP_CONF_HANDLE_EXCEPTION => true);
     }
     Xapp::run($conf);
     xapp_import('xapp.Rpc.*');
     xapp_import('xapp.Log.*');
 }
Beispiel #2
0
 /**
  * xapp option shortcut xapp_reset_options will reset first params options which can be:
  * 1) array = reset array
  * 2) object = object instance implementing xapp option handling or not
  * 3) string = object class name as string to handle static classes/options
  * 4) null = null when called inside class for xapp option handling for auto caller determination
  *
  * @param null|object|string|array $mixed expects value according to explanation above
  * @return void
  */
 function xapp_reset_options(&$mixed = null)
 {
     if (is_array($mixed)) {
         $mixed = array();
     } else {
         if (xapped()) {
             Xapp::resetOptions($mixed);
         } else {
             if (is_object($mixed) && xapp_can_options($mixed)) {
                 $mixed->options = array();
             } else {
                 if (is_string($mixed) && xapp_can_options($mixed)) {
                     $mixed::$options = array();
                 }
             }
         }
     }
 }