You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 14, 2021. It is now read-only.
/**
* Setting the sort to a specified value.
* Allows to sort results, only if the cattegory selected is not 'ALL'
*
* @param string $parameter
*
* @return AmazonECS
*
* @autor alacret
*
*/
public function sort($parameter) {
if(!isset($this -> requestConfig['category']) or $this -> requestConfig['category'] == null ){
throw new InvalidArgumentException('A category must be set before adding the sort parameter');
}
if($this -> requestConfig['category'] == "All" ){
throw new InvalidArgumentException('The sort is not supported for the "All" category');
}
if($parameter == null or $parameter == "" ){
throw new InvalidArgumentException(sprintf('%s : invalid value for sort parameter',$parameter));
}
$this -> responseConfig['optionalParameters'] = array_merge($this -> responseConfig['optionalParameters'], array("Sort" => $parameter));
return $this;
}