public function searchEntities(CriteriaBase $criteria)
    {
        $this->throttler->throttle();
        $query = $criteria ? get_object_vars($criteria) : array();

        $entityName = $criteria->getEntityName();

        $url = $this->_buildURL($criteria->getEntityListName(), $query);
        $response = $this->client->get($url)->send();
        //check exception in response
        $this->checkException($response);



        $entityXMLItems = $response->xml()->{$entityName . 'List'}->{$entityName};
        if(!$entityXMLItems){
            $entityXMLItems = $response->xml()->{$entityName . 'List'}->{$entityName. 'ListItem'};
        }

        $res = array();

        /**
         * @var \Dlin\Saasu\Entity\EntityBase $entity
         */
        foreach ($entityXMLItems as $item) {
            $fullClass = $criteria->getEntityClass();
            $entity = new $fullClass();
            $entity->fromXML($item->asXML());
            $res[] = $entity;
        }
        return $res;

    }