fix bug
This commit is contained in:
parent
042993311f
commit
006e24a117
@ -48,7 +48,7 @@ class Query
|
|||||||
return is_null($callback) ? $this->data : $this->data->map($callback);
|
return is_null($callback) ? $this->data : $this->data->map($callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setData(Collection $data)
|
public function setData(Collection $data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ class Query
|
|||||||
{
|
{
|
||||||
$this->data = $this->getList();
|
$this->data = $this->getList();
|
||||||
$callback && $this->data = $this->data->map($callback);
|
$callback && $this->data = $this->data->map($callback);
|
||||||
return $this;
|
return $this->ql;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getList()
|
protected function getList()
|
||||||
|
@ -19,8 +19,5 @@ class SystemServiceProvider implements ServiceProviderContract
|
|||||||
return $this;
|
return $this;
|
||||||
});
|
});
|
||||||
|
|
||||||
$kernel->bind('global',function (){
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,20 +15,22 @@ namespace QL;
|
|||||||
use phpQuery;
|
use phpQuery;
|
||||||
use QL\Dom\Query;
|
use QL\Dom\Query;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Closure;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class QueryList
|
* Class QueryList
|
||||||
* @package QL
|
* @package QL
|
||||||
*
|
*
|
||||||
* @method QueryList getHtml()
|
* @method string getHtml()
|
||||||
* @method QueryList setHtml($html)
|
* @method QueryList setHtml($html)
|
||||||
* @method QueryList html($html)
|
* @method QueryList html($html)
|
||||||
* @method Dom\Elements find($selector)
|
* @method Dom\Elements find($selector)
|
||||||
* @method QueryList rules(array $rules)
|
* @method QueryList rules(array $rules)
|
||||||
* @method QueryList range($range)
|
* @method QueryList range($range)
|
||||||
* @method QueryList removeHead()
|
* @method QueryList removeHead()
|
||||||
* @method QueryList query($callback = null)
|
* @method QueryList query(Closure $callback = null)
|
||||||
* @method Collection getData($callback = null)
|
* @method Collection getData(Closure $callback = null)
|
||||||
|
* @method QueryList setData(Collection $data)
|
||||||
* @method QueryList encoding(string $outputEncoding,string $inputEncoding = null)
|
* @method QueryList encoding(string $outputEncoding,string $inputEncoding = null)
|
||||||
* @method QueryList get($url,$args = null,$otherArgs = [])
|
* @method QueryList get($url,$args = null,$otherArgs = [])
|
||||||
* @method QueryList post($url,$args = null,$otherArgs = [])
|
* @method QueryList post($url,$args = null,$otherArgs = [])
|
||||||
@ -87,9 +89,10 @@ class QueryList
|
|||||||
phpQuery::$documents = [];
|
phpQuery::$documents = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bind(string $name,\Closure $provide)
|
public function bind(string $name,Closure $provide)
|
||||||
{
|
{
|
||||||
$this->kernel->bind($name,$provide);
|
$this->kernel->bind($name,$provide);
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user