Changeset View
Changeset View
Standalone View
Standalone View
src/future/http/PhutilHTTPEngineExtension.php
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | abstract class PhutilHTTPEngineExtension | ||||
} | } | ||||
final public function getExtensionKey() { | final public function getExtensionKey() { | ||||
return $this->getPhobjectClassConstant('EXTENSIONKEY'); | return $this->getPhobjectClassConstant('EXTENSIONKEY'); | ||||
} | } | ||||
final public static function getAllExtensions() { | final public static function getAllExtensions() { | ||||
return id(new PhutilClassMapQuery()) | return (new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getExtensionKey') | ->setUniqueMethod('getExtensionKey') | ||||
->execute(); | ->execute(); | ||||
} | } | ||||
final public static function getExtension($key) { | final public static function getExtension($key) { | ||||
$extensions = self::getAllExtensions(); | $extensions = self::getAllExtensions(); | ||||
return idx($extensions, $key); | return idx($extensions, $key); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0