Поправил типы
This commit is contained in:
parent
dd757b3c1e
commit
8f5d029868
2 changed files with 5 additions and 11 deletions
|
|
@ -99,18 +99,9 @@ class Connection_HttpRequest
|
||||||
static function getJSON($url, $data) {
|
static function getJSON($url, $data) {
|
||||||
$query = http_build_query($data);
|
$query = http_build_query($data);
|
||||||
$q = $url . '?' . $query;
|
$q = $url . '?' . $query;
|
||||||
/*$c = new Connection_HttpRequest();
|
|
||||||
$c->http_version = "HTTP/1.0";
|
|
||||||
|
|
||||||
|
$content = File::getContents($q);
|
||||||
$c->setUrl($q);
|
return json_decode((string) preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $content), true);
|
||||||
$page = $c->getPage();
|
|
||||||
|
|
||||||
$response = new Connection_HttpResponse($page);
|
|
||||||
$data = $response->getData();
|
|
||||||
*/
|
|
||||||
$data = file_get_contents($q);
|
|
||||||
return json_decode((string) preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $data), true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ class Setup
|
||||||
protected $stack = array();
|
protected $stack = array();
|
||||||
|
|
||||||
public $zip;
|
public $zip;
|
||||||
|
|
||||||
public $target;
|
public $target;
|
||||||
|
public $source;
|
||||||
|
|
||||||
public function __construct($file)
|
public function __construct($file)
|
||||||
{
|
{
|
||||||
|
|
@ -25,6 +27,7 @@ class Setup
|
||||||
$this->node = simplexml_load_file($file);
|
$this->node = simplexml_load_file($file);
|
||||||
|
|
||||||
$this->target = '';
|
$this->target = '';
|
||||||
|
$this->source = '';
|
||||||
$this->zip = new ZipArchive();
|
$this->zip = new ZipArchive();
|
||||||
$this->zip->open(strtr($file, array('.xml' => '.zip')));
|
$this->zip->open(strtr($file, array('.xml' => '.zip')));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue