private function resolveMagicConstantValue($name) { switch (strtoupper($name)) { case '__DIR__': return $this->magicConstants->getDirectory(); case '__FILE__': return $this->magicConstants->getFile(); case '__NAMESPACE__': return $this->magicConstants->getNamespace(); case '__CLASS__': return $this->magicConstants->getClass(); case '__TRAIT__': return $this->magicConstants->getTrait(); case '__METHOD__': return $this->magicConstants->getMethod($this->closureNestingLevel > 0); case '__FUNCTION__': return $this->magicConstants->getFunction($this->closureNestingLevel > 0); default: return null; } }