_keys = $keys; } /** * get request keys array * * @return array */ public function getKeys() { return $this->_keys; } /** * * checks at least one method of payment has been selected * * @return bool return true if the validation is successful */ public function isValid() { $request = Front::getInstance()->getRequest(); $values = array(); foreach ($this->_keys as $key) { $array = $request->getParam($key); if (is_array($array)) { $values = array_merge($values, $request->getParam($key)); } else if (is_string($array)) { $values[] = $array; } } $values = array_filter($values); if (count($values) > 0) { return true; } return false; } }