src/Zicht/Bundle/UrlBundle/Url/Params/Params.php
public function getOne($key, $default = null)
    {
        $ret = $default;
        $all = $this->get($key);
        if (count($all) > 0) {
            $ret = array_shift($all);
        }

        return $ret;
    }
public function getOne($key, $default = null)
    {
        $ret = $default;
        $all = $this->get($key);
        if (count($all) > 0) {
            $ret = array_shift($all);
        }

        return $ret;
    }
public function getOne ( $ key , $ default = null ) { $ ret = $ default ; $ all = $ this -> get ( $ key ) ; if ( count ( $ all ) > 0 ) { $ ret = array_shift ( $ all ) ; } return $ ret ; }
Returns a single value, and defaults to the given default parameter if not available.

@param string $key
@param mixed $default
@return mixed
Returns a single value and defaults to the given default parameter if not available .