Esempio n. 1
0
 public function query()
 {
     $args = func_get_args();
     $sql = $args[0];
     icms_Event::trigger('icms_db_IConnection', 'execute', $this, array('sql' => $args[0]));
     return call_user_func_array(array('parent', 'query'), $args);
 }
Esempio n. 2
0
 /**
  * Triggers a specific event on all the libraries
  *
  * Here are the currently supported events:
  * - startCoreBoot : this event is triggered at the  start of the core booting process (start  of include/common.php)
  * - finishCoreBoot : this event is triggered at the end of the core booting process (end of include/common.php)
  * - adminHeader : this event is triggered when calling icms_cp_header() and is used to output content in the head section of the admin side
  * - beforeFooter : this event is triggered when include/footer.php is called, at the begining of the file
  * - startOutputInit : this event is triggered when starting to output the content, in include/header.php after instantiation of $xoopsTpl
  *
  * @param $event string name of the event to trigger
  * @param $array mixed container to pass any arguments to be used by the library
  *
  * @return	TRUE if successful, FALSE if not
  */
 public function triggerEvent($event, $array = array())
 {
     $event = strtolower($event);
     icms_Event::trigger('icms', $event, null, $array);
 }
Esempio n. 3
0
 /**
  * Creates Session ID & Starts the session
  * removes Expired Custom Sessions after session Start
  * @param   string  $sslpost_name    sets the session_id as ssl Name defined in preferences (if SSL enabled)
  * @return
  **/
 public function sessionStart($sslpost_name = '')
 {
     global $icmsConfig;
     if ($icmsConfig['use_ssl'] && isset($sslpost_name) && $sslpost_name != '') {
         session_id($sslpost_name);
     } elseif ($icmsConfig['use_mysession'] && $icmsConfig['session_name'] != '' && $icmsConfig['session_expire'] > 0) {
         if (isset($_COOKIE[$icmsConfig['session_name']])) {
             session_id($_COOKIE[$icmsConfig['session_name']]);
         }
         if (function_exists('session_cache_expire')) {
             session_cache_expire($icmsConfig['session_expire']);
         }
         @ini_set('session.gc_maxlifetime', $icmsConfig['session_expire'] * 60);
     }
     if ($icmsConfig['use_mysession'] && $icmsConfig['session_name'] != '') {
         session_name($icmsConfig['session_name']);
     } else {
         session_name('ICMSSESSION');
     }
     session_start();
     self::removeExpiredCustomSession('xoopsUserId');
     icms_Event::trigger('icms_core_Session', 'sessionStart', $this);
     return;
 }
Esempio n. 4
0
 /**
  * Instanciate the specified service
  * @param string $name
  * @param mixed $factory
  * @param array $args
  * @return object
  */
 public static function loadService($name, $factory, $args = array())
 {
     self::${$name} = self::create($factory, $args);
     icms_Event::trigger('icms', 'loadService', null, array('name' => $name, 'service' => self::${$name}));
     icms_Event::trigger('icms', 'loadService-' . $name, null, array('name' => $name, 'service' => self::${$name}));
 }