private function _prepareParameters(array &$params) { if (empty($params['attributes'])) { $params['attributes'] = array(); } if (empty($params['fields'])) { throw new InvalidArgumentException("Fields are required"); } }