src/Net/HTTP/Reader.php
protected function applyCurlOptions( Net_CURL $curl, $options = array() )
	{
		foreach( $options as $key => $value )
		{
			if( is_string( $key ) )
			{
				if( !( preg_match( "@^CURLOPT_@", $key ) && defined( $key ) ) )
					throw new InvalidArgumentException( 'Invalid option constant key "'.$key.'"' );
				$key	= constant( $key );
			}
			if( !is_int( $key ) )
				throw new InvalidArgumentException( 'Option must be given as integer or string' );
			$curl->setOption( $key, $value );
		}
	}
protected function applyCurlOptions( Net_CURL $curl, $options = array() )
	{
		foreach( $options as $key => $value )
		{
			if( is_string( $key ) )
			{
				if( !( preg_match( "@^CURLOPT_@", $key ) && defined( $key ) ) )
					throw new InvalidArgumentException( 'Invalid option constant key "'.$key.'"' );
				$key	= constant( $key );
			}
			if( !is_int( $key ) )
				throw new InvalidArgumentException( 'Option must be given as integer or string' );
			$curl->setOption( $key, $value );
		}
	}
protected function applyCurlOptions ( Net_CURL $ curl , $ options = array ( ) ) { foreach ( $ options as $ key => $ value ) { if ( is_string ( $ key ) ) { if ( ! ( preg_match ( "@^CURLOPT_@" , $ key ) && defined ( $ key ) ) ) throw new InvalidArgumentException ( 'Invalid option constant key "' . $ key . '"' ) ; $ key = constant ( $ key ) ; } if ( ! is_int ( $ key ) ) throw new InvalidArgumentException ( 'Option must be given as integer or string' ) ; $ curl -> setOption ( $ key , $ value ) ; } }
Applies cURL Options to a cURL Object.
@access		protected
@param		Net_CURL	$curl				cURL Object
@param		array		$options			Map of cURL Options
@return		void
Applies cURL Options to a cURL Object .