public static function instance() {

    if (empty(self::$inst)) {
      $klass = \HPCloud\Bootstrap::config('transport');
      self::$inst = new $klass();
    }
    return self::$inst;
  }
public static function instance() {

    if (empty(self::$inst)) {
      $klass = \HPCloud\Bootstrap::config('transport');
      self::$inst = new $klass();
    }
    return self::$inst;
  }
public static function instance ( ) { if ( empty ( self :: $ inst ) ) { $ klass = \ HPCloud \ Bootstrap :: config ( 'transport' ) ; self :: $ inst = new $ klass ( ) ; } return self :: $ inst ; }
Get an instance of a Transporter.

See HPCloud::Transport::CURLTransport and HPCloud::Transport::PHPStreamTransport
for implementations of an HPCloud::Transport::Transporter.

To set the transport, the suggested method is this:

@code
<?php
// Set the 'transport' config option.
$settings = array(
// Make sure you use the entire namespace, and that
// your classloader can find this namespace.
'transport' => '\HPCloud\Transport\CURLTransport',
);

// Merge $settings into existing configuration.
\HPCloud\Bootstrap::setConfiguration($settings);
?>
@endcode

@retval HPCloud::Transport::Transporter
@return \HPCloud\Transport\Transporter
An initialized transporter.
Get an instance of a Transporter .