public function get($nameOrPattern)
    {
        $configGet = new Rediska_Connection_Exec($this->_connection, array('CONFIG', 'GET', $nameOrPattern));
        $valuesAfterNames = $configGet->execute();

        if (preg_match('/\W/i', $nameOrPattern)) { // Pattern
            $isParameter = true;
            $namesAndValues = array();
            foreach($valuesAfterNames as $nameOrValue) {
                if ($isParameter) {
                    $name = $nameOrValue;
                } else {
                    $namesAndValues[$name] = $this->_sanitizeValue($nameOrValue);
                }

                $isParameter = !$isParameter;
            }

            return $namesAndValues;
        } else { // Parameter name
            if (empty($valuesAfterNames)) {
                return null;
            } else {
                return $this->_sanitizeValue($valuesAfterNames[1]);
            }
        }
    }
public function get($nameOrPattern)
    {
        $configGet = new Rediska_Connection_Exec($this->_connection, array('CONFIG', 'GET', $nameOrPattern));
        $valuesAfterNames = $configGet->execute();

        if (preg_match('/\W/i', $nameOrPattern)) { // Pattern
            $isParameter = true;
            $namesAndValues = array();
            foreach($valuesAfterNames as $nameOrValue) {
                if ($isParameter) {
                    $name = $nameOrValue;
                } else {
                    $namesAndValues[$name] = $this->_sanitizeValue($nameOrValue);
                }

                $isParameter = !$isParameter;
            }

            return $namesAndValues;
        } else { // Parameter name
            if (empty($valuesAfterNames)) {
                return null;
            } else {
                return $this->_sanitizeValue($valuesAfterNames[1]);
            }
        }
    }
public function get ( $ nameOrPattern ) { $ configGet = new Rediska_Connection_Exec ( $ this -> _connection , array ( 'CONFIG' , 'GET' , $ nameOrPattern ) ) ; $ valuesAfterNames = $ configGet -> execute ( ) ; if ( preg_match ( '/\W/i' , $ nameOrPattern ) ) { // Pattern $ isParameter = true ; $ namesAndValues = array ( ) ; foreach ( $ valuesAfterNames as $ nameOrValue ) { if ( $ isParameter ) { $ name = $ nameOrValue ; } else { $ namesAndValues [ $ name ] = $ this -> _sanitizeValue ( $ nameOrValue ) ; } $ isParameter = ! $ isParameter ; } return $ namesAndValues ; } else { // Parameter name if ( empty ( $ valuesAfterNames ) ) { return null ; } else { return $ this -> _sanitizeValue ( $ valuesAfterNames [ 1 ] ) ; } } }
Get parameter or parameters by pattern

@param string $nameOrPattern Name or pattern
@return string|array
Get parameter or parameters by pattern