Source for file http.php

Documentation is available at http.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  GitHub
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * HTTP client class for connecting to a GitHub instance.
  14.  *
  15.  * @package     Joomla.Platform
  16.  * @subpackage  GitHub
  17.  * @since       11.3
  18.  */
  19. class JGithubHttp extends JHttp
  20. {
  21.     /**
  22.      * @const  integer  Use no authentication for HTTP connections.
  23.      * @since  11.3
  24.      */
  25.     const AUTHENTICATION_NONE = 0;
  26.  
  27.     /**
  28.      * @const  integer  Use basic authentication for HTTP connections.
  29.      * @since  11.3
  30.      */
  31.     const AUTHENTICATION_BASIC = 1;
  32.  
  33.     /**
  34.      * @const  integer  Use OAuth authentication for HTTP connections.
  35.      * @since  11.3
  36.      */
  37.     const AUTHENTICATION_OAUTH = 2;
  38.  
  39.     /**
  40.      * Constructor.
  41.      *
  42.      * @param   JRegistry       $options    Client options object.
  43.      * @param   JHttpTransport  $transport  The HTTP transport object.
  44.      *
  45.      * @since   11.3
  46.      */
  47.     public function __construct(JRegistry $options nullJHttpTransport $transport null)
  48.     {
  49.         // Call the JHttp constructor to setup the object.
  50.         parent::__construct($options$transport);
  51.  
  52.         // Make sure the user agent string is defined.
  53.         $this->options->def('userAgent''JGitHub/2.0');
  54.  
  55.         // Set the default timeout to 120 seconds.
  56.         $this->options->def('timeout'120);
  57.     }
  58. }

Documentation generated on Tue, 19 Nov 2013 15:04:55 +0100 by phpDocumentor 1.4.3