On Sat, Apr 18, 2015 at 4:24 PM, georges <geol...@gmail.com> wrote:

> ​Hi php internals,
>
> Currently spl_autoload_register() pass the name of the class entity to the
> first *Callable* argument​, but there is now way (as i far i know) to know
> what kind of entity we're looking for.
> -Class ?
> -Interface ?
> -Trait?
>
>
> A second argument should be added to the *Callable* function describing
> what kind of entity we're looking for.
>

This is not possible, because we do not generally know if something is a
class or an interface or a trait when autoloading it. E.g. if I write
class_alias('X', 'Y') and X is autoloaded, it could be a class an interface
or a trait - it just doesn't matter.

Nikita

Reply via email to