What is the modifiers key in getMetadata() for a method?

The result of calling getMetadata() on a method or user-defined function in Lucee includes the key ‘modifier’, which I don’t know about. It’s not present in Lucee, or ACF 11 (all I have handy at the moment).

What is that? Is it documented somewhere?


I would guess it’s the access modifier like public, private, package, remote, etc. Does the data you see support that guess?

Thanks for jumping in Brad, but no, the ‘access’ attribute is what you’re thinking of, which shows up in getMetadata() as ‘access’.

Oddly enough, when I supply it explicitly in the code, it’s still empty in getMetadata().

public function f() modifier="asdfqwer" zzz=1

That gives (among other keys)


Kind of seems like a leaked var, if you can’t set it. Or it’s something else I don’t understand.

Try making your function static. Is that what it’s for?

Hah, didn’t even realize Lucee has static methods now, so thanks for the poke! But no…

    public static function f()


The modifier key is still “”.