Zend/Gdata/YouTube/VideoQuery.php
public function setLocation($value)
    {
        switch($value) {
            case null:
                unset($this->_params['location']);
            default:
                $parameters = explode(',', $value);
                if (count($parameters) != 2) {
                    require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    throw new Zend_Gdata_App_InvalidArgumentException(
                        'You must provide 2 coordinates to the location ' .
                        'URL parameter');
                }

                foreach($parameters as $param) {
                    $temp = trim($param);
                    // strip off the optional exclamation mark for numeric check
                    if (substr($temp, -1) == '!') {
                        $temp = substr($temp, 0, -1);
                    }
                    if (!is_numeric($temp)) {
                        require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                        throw new Zend_Gdata_App_InvalidArgumentException(
                            'Value provided to location parameter must' .
                            ' be in the form of two coordinates');
                    }
                }
                $this->_params['location'] = $value;
        }
    }
public function setLocation($value)
    {
        switch($value) {
            case null:
                unset($this->_params['location']);
            default:
                $parameters = explode(',', $value);
                if (count($parameters) != 2) {
                    require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    throw new Zend_Gdata_App_InvalidArgumentException(
                        'You must provide 2 coordinates to the location ' .
                        'URL parameter');
                }

                foreach($parameters as $param) {
                    $temp = trim($param);
                    // strip off the optional exclamation mark for numeric check
                    if (substr($temp, -1) == '!') {
                        $temp = substr($temp, 0, -1);
                    }
                    if (!is_numeric($temp)) {
                        require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                        throw new Zend_Gdata_App_InvalidArgumentException(
                            'Value provided to location parameter must' .
                            ' be in the form of two coordinates');
                    }
                }
                $this->_params['location'] = $value;
        }
    }
public function setLocation ( $ value ) { switch ( $ value ) { case null : unset ( $ this -> _params [ 'location' ] ) ; default : $ parameters = explode ( ',' , $ value ) ; if ( count ( $ parameters ) != 2 ) { require_once 'Zend/Gdata/App/InvalidArgumentException.php' ; throw new Zend_Gdata_App_InvalidArgumentException ( 'You must provide 2 coordinates to the location ' . 'URL parameter' ) ; } foreach ( $ parameters as $ param ) { $ temp = trim ( $ param ) ; // strip off the optional exclamation mark for numeric check if ( substr ( $ temp , - 1 ) == '!' ) { $ temp = substr ( $ temp , 0 , - 1 ) ; } if ( ! is_numeric ( $ temp ) ) { require_once 'Zend/Gdata/App/InvalidArgumentException.php' ; throw new Zend_Gdata_App_InvalidArgumentException ( 'Value provided to location parameter must' . ' be in the form of two coordinates' ) ; } } $ this -> _params [ 'location' ] = $ value ; } }
Sets the location parameter for the query

@param string $value
@throws Zend_Gdata_App_InvalidArgumentException
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
Sets the location parameter for the query