Source for file Curl.class.php

Documentation is available at Curl.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Curl
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Curl Interface, wrapper to curl_* functions (basic Interface)
  22.  *
  23.  * @category Gumbo
  24.  * @package Curl
  25.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  26.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  27.  * @author Michael Luster <mluster79@yahoo.com>
  28.  * @link http://sourceforge.net/projects/phpgumbo
  29.  * @desc Curl Interface
  30.  * @version 0.0.1
  31.  */
  32.  
  33. interface Gumbo_Interface_Curl {
  34.     
  35.     /** ACTION METHODS **/
  36.     /**
  37.      * Executes the CURL call
  38.      * @return bool|string
  39.      */
  40.     public function execute ();
  41.     
  42.     
  43.     
  44.     /** MUTATOR METHODS **/
  45.     /**
  46.      * Sets a CURL option
  47.      * @param int|array$option CURLOPT_* constant
  48.      * @param mix $value primitive type value
  49.      * @todo verify constants
  50.      */
  51.     public function setOption ($option$value=null);
  52.     
  53.     
  54.     
  55.     /** ACCESSOR METHODS **/
  56.     /**
  57.      * Returns the CURL resource
  58.      * @return resource 
  59.      */
  60.     public function getCurl ();
  61.     
  62.     /**
  63.      * Returns the reponse contents returned from the CURL call
  64.      * @return string 
  65.      */
  66.     public function getContents ();
  67.     
  68.     /**
  69.      * Returns the CURL version information
  70.      * @param int $age 
  71.      * @return array 
  72.      */
  73.     public function getVersion ($age=null);
  74.     
  75.     /**
  76.      * Returns information about CURL
  77.      * @param string $opt CURLINFO_* option
  78.      * @return array|string
  79.      */
  80.     public function getInfo ($opt=null);
  81.     
  82. }
  83.  
  84. ?>