Page MenuHomePhorge
Diviner libphutil Tech Docs PhutilHTTPEngineExtension

abstract class PhutilHTTPEngineExtension
libphutil Technical Documentation (Futures)

Extend HTTP behavior by injecting proxies or compromising SSL.

Tasks

Extension Information

  • abstract public function getExtensionName() — Human-readable name of this HTTP extension.

Configuring HTTP Behavior

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

abstract public function getExtensionName()

Human-readable name of this HTTP extension.

Return
stringHuman readable name.

public function shouldTrustAnySSLAuthorityForURI($uri)

Return true to disable SSL authority verification for a URI.

By default, certificates must be signed by a recognized authority and requests fail if the host provides an invalid certificate. You can override this behavior to accept any certificate (including self-signed certificates). Doing this compromises the security of SSL.

Parameters
PhutilURI$uri
Return
boolReturn `true` to disable authority verification.

public function shouldTrustAnySSLHostnameForURI($uri)

Return true to disable SSL hostname verification for a URI.

By default, certificates should be signed for the correct hostname, and requests fail if the host provides a certificate for a different hostname. You can override this behavior to accept any certificate, including certificates for a different host. Doing this compromises the security of SSL.

Parameters
PhutilURI$uri
Return
boolReturn `true` to disable hostname verification.

public function getHTTPProxyURI($uri)

Return a PhutilURI to proxy requests.

If some or all outbound HTTP requests must be proxied, you can return the URI for a proxy to use from this method.

Parameters
PhutilURI$uri
Return
null|PhutilURIProxy URI.

final public function getExtensionKey()

This method is not documented.
Return
wild

final public static function getAllExtensions()

This method is not documented.
Return
wild

final public static function getExtension($key)

This method is not documented.
Parameters
$key
Return
wild

final public static function requireExtension($key)

This method is not documented.
Parameters
$key
Return
wild

final public static function buildHTTPProxyURI($uri)

This method is not documented.
Parameters
PhutilURI$uri
Return
wild