This commit is contained in:
Jaeger 2017-09-25 14:15:26 +08:00
parent 042993311f
commit 006e24a117
3 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ class Query
return is_null($callback) ? $this->data : $this->data->map($callback);
}
protected function setData(Collection $data)
public function setData(Collection $data)
{
$this->data = $data;
}
@ -83,7 +83,7 @@ class Query
{
$this->data = $this->getList();
$callback && $this->data = $this->data->map($callback);
return $this;
return $this->ql;
}
protected function getList()

View File

@ -19,8 +19,5 @@ class SystemServiceProvider implements ServiceProviderContract
return $this;
});
$kernel->bind('global',function (){
});
}
}

View File

@ -15,20 +15,22 @@ namespace QL;
use phpQuery;
use QL\Dom\Query;
use Illuminate\Support\Collection;
use Closure;
/**
* Class QueryList
* @package QL
*
* @method QueryList getHtml()
* @method string getHtml()
* @method QueryList setHtml($html)
* @method QueryList html($html)
* @method Dom\Elements find($selector)
* @method QueryList rules(array $rules)
* @method QueryList range($range)
* @method QueryList removeHead()
* @method QueryList query($callback = null)
* @method Collection getData($callback = null)
* @method QueryList query(Closure $callback = null)
* @method Collection getData(Closure $callback = null)
* @method QueryList setData(Collection $data)
* @method QueryList encoding(string $outputEncoding,string $inputEncoding = null)
* @method QueryList get($url,$args = null,$otherArgs = [])
* @method QueryList post($url,$args = null,$otherArgs = [])
@ -87,9 +89,10 @@ class QueryList
phpQuery::$documents = [];
}
public function bind(string $name,\Closure $provide)
public function bind(string $name,Closure $provide)
{
$this->kernel->bind($name,$provide);
return $this;
}
}