PaulB
Well-known member
As of 2.2.4, the signature of \XF::asVisitor is:
However,
PHP:
public static function asVisitor(\XF\Entity\User $user, \Closure $action, bool $withLanguage = false)
However,
asVisitor doesn't actually require that $action be a Closure; it can handle any callable. I don't see any reason to limit it to Closure.
Upvote
1