Yes, it is possible. For example:
Construct url like this:
url -> http://your-app.dev/app_dev.php/some/route/?options[city]=1231&options[county]=3432
then in controller for some/route
action you can get
$arr = $request->get('options', array());
And then $arr
should conatin:
Array
(
[city] => 1231
[county] => 3432
)
[Edit]:
Maybe try this:
Remove requirements for sector
(or set it to match comma separeted list requirements="[\w,]+"
:
* @Annotations\QueryParam(name="sector", default="IT", description="How many pages to return.")
Then construct url with sector
as an comma separated list, for example
?offset=5&limit=10§or=IT,HEALTH
And inside controller retrive it like this:
$secteur = explode(',', $paramFetcher->get('sector'));
[Edit2]:
public function all($limit = 5, $offset = 0,$secteur) {
if (sizeof($secteur)>=1){
return $this->repository->findBy(array('secteur' => $secteur), array('secteur' => 'ASC'));
}
return $this->repository->findBy(array(), null, $limit);
}