public function AuthcacheP13nObjectFactory::resolveReferences in Authenticated User Page Caching (Authcache) 7.2
Substitute resource references with their actual values.
1 call to AuthcacheP13nObjectFactory::resolveReferences()
- AuthcacheP13nObjectFactory::get in modules/
authcache_p13n/ includes/ AuthcacheP13nObjectFactory.inc - Return the value or instance for the given resource.
File
- modules/
authcache_p13n/ includes/ AuthcacheP13nObjectFactory.inc, line 208 - Defines the class AuthcacheP13nObjectFactory.
Class
- AuthcacheP13nObjectFactory
- A utility class helping with dependency injection.
Code
public function resolveReferences($value) {
$result = FALSE;
if (is_string($value)) {
list($literal, $rname, $proc, $procarg) = static::parseReference($value);
if ($rname) {
$result = $this
->get($rname);
if ($proc) {
$result = call_user_func($this->processors[$proc], $result, $procarg, $rname, $this);
$result = $this
->resolveReferences($result);
}
}
else {
$result = $literal;
}
}
elseif (is_array($value)) {
$result = array();
foreach ($value as $key => $child) {
$result[$key] = $this
->resolveReferences($child);
}
}
else {
$result = $value;
}
return $result;
}