Beispiel #1
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();
                 }
             }
         }
     }
 }