Page MenuHomePhorge
Diviner Tech Docs PhabricatorCachedClassMapQuery

final class PhabricatorCachedClassMapQuery
Phorge Technical Documentation (Cache)

Cached PhutilClassMapQuery which can perform lookups for single classes efficiently.

Some class trees (like Conduit methods and PHID types) contain a huge number of classes but are frequently accessed by looking for a specific class by a known identifier (like a Conduit method name or a PHID type constant).

Loading the entire class map for these cases has a small but measurable performance cost. Instead, we can build a cache from each Conduit method name to just the class required to serve that request. This means that we load fewer classes and have less overhead to execute API calls.

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.

public function setClassMapQuery($query)

This method is not documented.
Parameters
PhutilClassMapQuery$query
Return
wild

public function setMapKeyMethod($method)

This method is not documented.
Parameters
$method
Return
wild

public function loadClasses($values)

This method is not documented.
Parameters
array$values
Return
wild

public function loadClass($value)

This method is not documented.
Parameters
$value
Return
wild

private function getCacheKeys($values)

This method is not documented.
Parameters
array$values
Return
wild

private function newObject($class_name)

This method is not documented.
Parameters
$class_name
Return
wild

private function newObjectMap()

This method is not documented.
Return
wild

private function getObjectMapKey($object)

This method is not documented.
Parameters
$object
Return
wild