예제 #1
0
        try {
            if (is_array($v)) {
                $profiler->start('Processing window ' . $v['sWindowId']);
                $windows = array();
                if ($v['sWindowId'] == 'game:Initialize') {
                    $windows = $this->getInitialWindows();
                } else {
                    $window = $this->getWindow($v['sWindowId']);
                    if (isset($v['sRequestData'])) {
                        $window->setRequestData($v['sRequestData']);
                    }
                    $window->setJsonInputData($v['sInputData']);
                    // Append to array
                    $windows[] = $window;
                }
                handleOpenWindowRequest($windows);
                $profiler->stop();
            }
        } catch (Exception $e) {
            // Send a mail
            error_log((string) $e);
            if (defined('OUTPUT_DEBUG_DATA') && OUTPUT_DEBUG_DATA) {
                echo $e;
            }
        }
    }
    $profiler->stop();
}
$updatewindows = $this->getOpenWindows();
$firstUpdate = true;
foreach ($updatewindows as $window) {
 public function openWindow($sWindow, $aParams)
 {
     $window = $this->getWindow($sWindow);
     $window->setRequestData(json_encode($aParams));
     // Check if unique (in this request)
     $windows = $this->getOpenWindows();
     foreach ($windows as $v) {
         if ($v->equals($window)) {
             return;
         }
     }
     handleOpenWindowRequest(array($window));
 }