public static function load($path) { if (file_exists($path)) { // Successful includes, unless overridden by the included file, return 1. $data = (require $path); if (is_array($data)) { self::$config = array_merge(self::$config, $data); } } }
die(sprintf("Config XML error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser))); //This is before we have the log location } xml_parser_free($this->parser); return $this->results; } function tagStart($parser, $name, $attrs) { $attrs = array_change_key_case($attrs, CASE_LOWER); $tag = array(strtolower($name) => $attrs); array_push($this->results, $tag); } function tagEnd($parser, $name) { //http://www.php.net/manual/en/function.xml-parse.php $this->results[count($this->results) - 2]['childrens'][] = $this->results[count($this->results) - 1]; if (count($this->results[count($this->results) - 2]['childrens']) == 1) { $this->results[count($this->results) - 2]['firstchild'] =& $this->results[count($this->results) - 2]['childrens'][0]; } array_pop($this->results); } function __destruct() { } } $proxyConfig = new ProxyConfig(); $proxyConfig->useXML(); //$proxyConfig->useJSON(); $proxyLog = new ProxyLog($proxyConfig); $proxyObject = new Proxy($proxyConfig, $proxyLog); $proxyObject->getResponse();
/** * 프록시 클래스의 이름을 조회한다. * * @return string */ public function getClassName() { return $this->config->getProxyName(); }
public function setProxy(ProxyConfig $proxy) { return $this->set('proxy', $proxy->toArray()); }