Example #1
0
 /**
  * Parse both config files
  *
  * @param array|string $names Option names tree OPTIONAL
  *
  * @return array|mixed
  */
 public static function getOptions($names = null)
 {
     $result = parent::getOptions($names);
     // We redefine the host_details configuration if we are running via web interface
     if ('cli' != PHP_SAPI) {
         if ('host_details' == $names) {
             $result['http_host'] = $result['https_host'] = $_SERVER['HTTP_HOST'];
         }
         if (array('host_details', 'https_host') == $names || array('host_details', 'http_host') == $names) {
             $result = $_SERVER['HTTP_HOST'];
         }
     }
     return $result;
 }
Example #2
0
 /**
  * Return specified (or the whole list) options
  *
  * @param mixed $names List (or single value) of option names OPTIONAL
  *
  * @return mixed
  */
 public function getOptions($names = null)
 {
     return \XLite\Core\ConfigParser::getOptions($names);
 }