$app = Jfactory::getapplication ();
$app->login ();
Finally, what are the characteristics of this login () function in which class can be found, how should we find the source code of this function?
Jfactory::getapplication (); The source code is probably the following: it is not clear what the login function and the Getapplication function are related to.
Abstract class Jfactory {public static function getapplication ($id = null, $config = Array (), $prefix = ' J ') {if (!self:: $a pplication) {if (! $id) {jerror::raiseerror ($, ' Application instantiation Error ');} Self:: $application = Japplication::getinstance ($id, $config, $prefix);} Return self:: $application;}}
Reply to discussion (solution)
Jfactory is an abstract class and cannot be instantiated by itself
So there must be a class to inherit him
So all class XXXXX extends jfactory are possible
Jfactory is abstract, not an example of it. $app->login ();??? Out?.
Jfactory, look, the name should be a factory.
Jfactory::getapplication returns an object pointer based on a parameter
Self:: $application = Japplication::getinstance ($id, $config, $prefix);
$app exactly which class to go to japplication::getinstance here to find it
The IDE tool CTRL + Click will track to this method ...
Jfactory is abstract, not an example of it. $app->login ();??? Out?.
There's no mistake. This is someone else's code I asked.
Jfactory, look, the name should be a factory.
Jfactory::getapplication returns an object pointer based on a parameter
Self:: $application = Japplication::getinstance ($id, $config, $prefix);
$app exactly which class to go to japplication::getinstance here to find it
There are really, too. Thank you..