public function addNamespace($string)
    {
        if (is_array($string)) {
            foreach ($string as &$str) {
                $str = $this->addNamespace($str);
            }

            return $string;
        }

        if (strpos($string, $this->namespace) !== 0) {
            $string = $this->namespace . $string;
        }

        return $string;
    }
public function addNamespace($string)
    {
        if (is_array($string)) {
            foreach ($string as &$str) {
                $str = $this->addNamespace($str);
            }

            return $string;
        }

        if (strpos($string, $this->namespace) !== 0) {
            $string = $this->namespace . $string;
        }

        return $string;
    }
public function addNamespace ( $ string ) { if ( is_array ( $ string ) ) { foreach ( $ string as & $ str ) { $ str = $ this -> addNamespace ( $ str ) ; } return $ string ; } if ( strpos ( $ string , $ this -> namespace ) !== 0 ) { $ string = $ this -> namespace . $ string ; } return $ string ; }
Add Redis namespace to a string

@param  string $string String to namespace
@return string
Add Redis namespace to a string