/** * set term * * @param string * @return this */ public function setTerm($term) { //Argument 1 must be a string Eden_Zappos_Error::i()->argument(1, 'string'); $this->_term = $term; return $this; }
/** * set values id * * @param string|int * @return this */ public function setValuesId($values) { //Argument 1 must be a string or int Eden_Zappos_Error::i()->argument(1, 'string', 'int'); $this->_values = $values; return $this; }
protected function _getResponse($method, array $query = array()) { //Argument 1 must be a string Eden_Zappos_Error::i()->argument(1, 'string'); //Our request parameters $default = array(self::KEY => $this->_apiKey); //generate URL-encoded query string to build our NVP string $query = http_build_query($query + $default); $curl = Eden_Curl::i()->setUrl($method . '?' . $query)->setReturnTransfer(TRUE)->setHeader(false); $results = $curl->getQueryResponse(); foreach ($results as $key => $value) { if (!is_array($value)) { return $value; } if (!empty($value) && isset($value)) { foreach ($value as $k => $v) { $response = json_decode($k . ']}', false); if (empty($response)) { $response = json_decode($k, false); } break; } } else { return $key; } } return $response; }
/** * set brand id * * @param string|int * @return this */ public function setBrandId($brandId) { //Argument 1 must be a string or int Eden_Zappos_Error::i()->argument(1, 'string', 'int'); $this->_brandId = $brandId; return $this; }
/** * Set sizing transformation for an image * * @param string * @return this */ public function setImageRecipe($imageRecipe) { //Argument 1 must be a string Eden_Zappos_Error::i()->argument(1, 'string'); $this->_imageRecipe = '["' . $imageRecipe . '"]'; return $this; }
/** * filter results with distinct expression * * @param string * @param string * @return this */ public function filterProduct($facetFields, $facetValue) { Eden_Zappos_Error::i()->argument(1, 'string')->argument(2, 'string'); //Argument 2 must be a string $this->_filter = '{".' . $facetFields . '.":[".' . $facetValue . '."]}'; return $this; }
/** * filter by state location * * @param string * @return this */ public function setStateLocation($locationValue) { //Argument 1 must be a string Eden_Zappos_Error::i()->argument(1, 'string'); $this->_location = '{"state":"' . $locationValue . '"}'; return $this; }
/** * set start Date * * @param string|int * @return this */ public function setStartDate($startDate) { //Argument 1 must be a string or int Eden_Zappos_Error::i()->argument(1, 'string', 'int'); $this->_startDate = $startDate; return $this; }
/** * Include specific style in the results * * @param string * @return this */ public function includeSpecific($style) { //Argument 1 must be a string Eden_Zappos_Error::i()->argument(1, 'string'); $this->_style = '["' . $style . '"]'; return $this; }