Answer the question
In order to leave comments, you need to log in
How in a file is a class called by its unqualified name?
Faced the following example: There is a file, a namespace is set in it and several more spaces are connected. further in this file there is a link to the Blog class (an instance of it is created, its namespace is imported) . now the question is: the link uses an unqualified name (because the name is without a prefix) and according to the article ( https://habrahabr.ru/post/72097/) the program should not find this class, since it will look for matches only in its namespace (in this case in namespace backend\controllers; ). nevertheless everything works...
Answer the question
In order to leave comments, you need to log in
or by connecting the fully qualified class name we are connecting the class itself?
declared via use, used it is
not declared - searched in backend\controllers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question