Gets the value of the __FUNCTION__ magic constant.
public getFunction ( boolean $isWithinClosure ) : string | ||
$isWithinClosure | boolean | If within a closure defined in the function |
return | string |
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; } }