/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (isset($arguments[0]) && is_array($arguments[0])) { $arguments = $arguments[0]; } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 2 && is_array($arguments[1])) { $arguments = array_merge(array($arguments[0]), $arguments[1]); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 0 || $arguments[0] === 'NO ONE') { $arguments = array('NO', 'ONE'); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if ($arguments && is_array(end($arguments))) { $options = array_change_key_case(array_pop($arguments), CASE_UPPER); if (isset($options['WITHCOORD']) && $options['WITHCOORD'] == true) { $arguments[] = 'WITHCOORD'; } if (isset($options['WITHDIST']) && $options['WITHDIST'] == true) { $arguments[] = 'WITHDIST'; } if (isset($options['WITHHASH']) && $options['WITHHASH'] == true) { $arguments[] = 'WITHHASH'; } if (isset($options['COUNT'])) { $arguments[] = 'COUNT'; $arguments[] = $options['COUNT']; } if (isset($options['SORT'])) { $arguments[] = strtoupper($options['SORT']); } if (isset($options['STORE'])) { $arguments[] = 'STORE'; $arguments[] = $options['STORE']; } if (isset($options['STOREDIST'])) { $arguments[] = 'STOREDIST'; $arguments[] = $options['STOREDIST']; } } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 3 && is_array($arguments[2])) { $options = $this->prepareOptions(array_pop($arguments)); $arguments = array_merge($arguments, $options); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 2 && is_array($arguments[1])) { $members = array_pop($arguments); $arguments = array_merge($arguments, $members); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 2 && is_array($arguments[0])) { list($arguments, $timeout) = $arguments; array_push($arguments, $timeout); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 3 && is_array($arguments[2])) { list($operation, $destination) = $arguments; $arguments = $arguments[2]; array_unshift($arguments, $operation, $destination); } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 2 && is_array($arguments[1])) { foreach (array_pop($arguments) as $item) { $arguments = array_merge($arguments, $item); } } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (is_array(end($arguments))) { foreach (array_pop($arguments) as $member => $score) { $arguments[] = $score; $arguments[] = $member; } } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { $options = array(); $argc = count($arguments); if ($argc > 2 && is_array($arguments[$argc - 1])) { $options = $this->prepareOptions(array_pop($arguments)); } if (is_array($arguments[1])) { $arguments = array_merge(array($arguments[0], count($arguments[1])), $arguments[1]); } parent::setArguments(array_merge($arguments, $options)); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 2 && is_array($arguments[1])) { $flattenedKVs = array($arguments[0]); $args = $arguments[1]; foreach ($args as $k => $v) { $flattenedKVs[] = $k; $flattenedKVs[] = $v; } $arguments = $flattenedKVs; } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (is_array(end($arguments))) { foreach (array_pop($arguments) as $modifier => $value) { $modifier = strtoupper($modifier); if ($modifier === 'COPY' && $value == true) { $arguments[] = $modifier; } if ($modifier === 'REPLACE' && $value == true) { $arguments[] = $modifier; } } } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 4) { $lastType = gettype($arguments[3]); if ($lastType === 'string' && strtoupper($arguments[3]) === 'WITHSCORES') { // Used for compatibility with older versions $arguments[3] = array('WITHSCORES' => true); $lastType = 'array'; } if ($lastType === 'array') { $options = $this->prepareOptions(array_pop($arguments)); $arguments = array_merge($arguments, $options); } } parent::setArguments($arguments); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { if (count($arguments) === 1) { parent::setArguments($arguments); return; } $query = array($arguments[0]); $sortParams = array_change_key_case($arguments[1], CASE_UPPER); if (isset($sortParams['BY'])) { $query[] = 'BY'; $query[] = $sortParams['BY']; } if (isset($sortParams['GET'])) { $getargs = $sortParams['GET']; if (is_array($getargs)) { foreach ($getargs as $getarg) { $query[] = 'GET'; $query[] = $getarg; } } else { $query[] = 'GET'; $query[] = $getargs; } } if (isset($sortParams['LIMIT']) && is_array($sortParams['LIMIT']) && count($sortParams['LIMIT']) == 2) { $query[] = 'LIMIT'; $query[] = $sortParams['LIMIT'][0]; $query[] = $sortParams['LIMIT'][1]; } if (isset($sortParams['SORT'])) { $query[] = strtoupper($sortParams['SORT']); } if (isset($sortParams['ALPHA']) && $sortParams['ALPHA'] == true) { $query[] = 'ALPHA'; } if (isset($sortParams['STORE'])) { $query[] = 'STORE'; $query[] = $sortParams['STORE']; } parent::setArguments($query); }
/** * {@inheritdoc} */ public function setArguments(array $arguments) { $arguments = self::normalizeVariadic($arguments); parent::setArguments($arguments); }