commit
e527c637c7
@ -7,6 +7,7 @@
|
||||
|
||||
namespace QL;
|
||||
use Closure;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
class Config
|
||||
{
|
||||
@ -20,8 +21,8 @@ class Config
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->plugins = collect();
|
||||
$this->binds = collect();
|
||||
$this->plugins = new Collection();
|
||||
$this->binds = new Collection();
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ namespace QL\Dom;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Null_;
|
||||
use phpQueryObject;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class Elements
|
||||
@ -191,7 +192,7 @@ class Elements
|
||||
*/
|
||||
public function map($callback)
|
||||
{
|
||||
$collection = collect();
|
||||
$collection = new Collection();
|
||||
$this->elements->each(function ($dom) use (& $collection, $callback) {
|
||||
$collection->push($callback(new self(pq($dom))));
|
||||
});
|
||||
|
@ -147,7 +147,7 @@ class Query
|
||||
{
|
||||
if (is_callable($callback)) {
|
||||
if (empty($this->range)) {
|
||||
$data = collect($callback($data->all(), null));
|
||||
$data = new Collection($callback($data->all(), null));
|
||||
} else {
|
||||
$data = $data->map($callback);
|
||||
}
|
||||
@ -178,7 +178,7 @@ class Query
|
||||
}
|
||||
}
|
||||
|
||||
return collect($data);
|
||||
return new Collection($data);
|
||||
}
|
||||
|
||||
protected function extractContent(phpQueryObject $pqObj, $ruleName, $rule)
|
||||
|
@ -14,6 +14,7 @@ use Closure;
|
||||
use QL\Providers\HttpServiceProvider;
|
||||
use QL\Providers\PluginServiceProvider;
|
||||
use QL\Providers\SystemServiceProvider;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
class Kernel
|
||||
{
|
||||
@ -34,7 +35,7 @@ class Kernel
|
||||
public function __construct(QueryList $ql)
|
||||
{
|
||||
$this->ql = $ql;
|
||||
$this->binds = collect();
|
||||
$this->binds = new Collection();
|
||||
}
|
||||
|
||||
public function bootstrap()
|
||||
|
Loading…
x
Reference in New Issue
Block a user