/**
  * Constructor.
  *
  * @param   Registry   $options    Client options object.
  * @param   Transport  $transport  The HTTP transport object.
  *
  * @since   11.3
  */
 public function __construct(Registry $options = null, Transport $transport = null)
 {
     // Call the JHttp constructor to setup the object.
     parent::__construct($options, $transport);
     // Make sure the user agent string is defined.
     $this->options->def('userAgent', 'JGitHub/2.0');
     // Set the default timeout to 120 seconds.
     $this->options->def('timeout', 120);
 }
예제 #2
0
 /**
  * Constructor.
  *
  * @param   array               $options    Client options array.
  * @param   TransportInterface  $transport  The HTTP transport object.
  *
  * @since   1.0
  */
 public function __construct($options = array(), TransportInterface $transport = null)
 {
     // Call the JHttp constructor to setup the object.
     parent::__construct($options, $transport);
     // Make sure the user agent string is defined.
     if (!isset($this->options['userAgent'])) {
         $this->options['userAgent'] = 'JGitHub/2.0';
     }
     // Set the default timeout to 120 seconds.
     if (!isset($this->options['timeout'])) {
         $this->options['timeout'] = 120;
     }
 }
예제 #3
0
 /**
  * Constructor.
  *
  * @param   array               $options    Client options array.
  * @param   TransportInterface  $transport  The HTTP transport object.
  *
  * @since   1.0
  */
 public function __construct($options = array(), TransportInterface $transport = null)
 {
     // Call the BaseHttp constructor to setup the object.
     parent::__construct($options, $transport);
     // Make sure the user agent string is defined.
     if (!$this->getOption('userAgent')) {
         $this->setOption('userAgent', 'BDTransifex/2.0');
     }
     // Set the default timeout to 120 seconds.
     if (!$this->getOption('timeout')) {
         $this->setOption('timeout', 120);
     }
 }