Changeset View
Changeset View
Standalone View
Standalone View
src/applications/celerity/CelerityResourceMap.php
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | final class CelerityResourceMap extends Phobject { | ||||
* @return string|null Resource URI, or null if the name is unknown. | * @return string|null Resource URI, or null if the name is unknown. | ||||
*/ | */ | ||||
public function getURIForName($name) { | public function getURIForName($name) { | ||||
$hash = idx($this->nameMap, $name); | $hash = idx($this->nameMap, $name); | ||||
return $this->getURIForHash($hash); | return $this->getURIForHash($hash); | ||||
} | } | ||||
public function getHashForName($name) { | |||||
return idx($this->nameMap, $name); | |||||
} | |||||
/** | /** | ||||
* Return the absolute URI for a resource, identified by hash. | * Return the absolute URI for a resource, identified by hash. | ||||
* This method is fairly low-level and ignores packaging. | * This method is fairly low-level and ignores packaging. | ||||
* | * | ||||
* @param string Resource hash to lookup. | * @param string Resource hash to lookup. | ||||
* @return string|null Resource URI, or null if the hash is unknown. | * @return string|null Resource URI, or null if the hash is unknown. | ||||
*/ | */ | ||||
private function getURIForHash($hash) { | private function getURIForHash($hash) { | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |