Closed pjcdawkins closed 9 years ago
Nice, thanks. In theory this could cause an issue with two strings referring to a static class method (eg. ['DateTime', 'createFromFormat']
), though by the looks of it PHP only considers an array of two strings callable if they match exactly to an existing method. It's easy enough to extend Completion
in that case, so I'm not worried about it.
Yes, it's also easy enough to make a callback returning your array in that case.
A callback in PHP can legitimately be an array, such as
array($object, 'myMethod')
orarray('className', 'myStaticMethod')
.Completion::run()
didn't allow this because it interpreted the callback directly as an array of results.