/** * Read and set Xajax options from a data array * * @param array $aOptions The options array * @param string $sKeys The keys of the options in the array * * @return void */ public static function setOptions(array $aOptions, $sKeys = '') { // Find the config array in the input data $aKeys = explode('.', (string) $sKeys); foreach ($aKeys as $sKey) { if ($sKey) { if (!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey])) { throw new \Xajax\Exception\Config\Data('missing', $sKeys); } $aOptions = $aOptions[$sKey]; } } // Read options from the data self::readOptions($aOptions); // Set the options in the core library Xajax::getInstance()->setOptions(self::$aOptions); }
/** * Set the global Xajax response object * * @return void */ public function setGlobalResponse() { $this->response = Xajax::getGlobalResponse(); }