Lack of interest \XF::asVisitor() should take a callable instead of a \Closure

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

PaulB

Well-known member
As of 2.2.4, the signature of \XF::asVisitor is:
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
This suggestion has been closed. Votes are no longer accepted.
Top Bottom