Ecmallaction jump question if I have such a jump & nbsp;: & nbsp; index. php? App = goods & amp; act = drop his jump from & nbsp; index. php & nbsp;-& gt; & nbsp; ECMall & nbsp; & nbsp ecmall action
Suppose I have such a jump: index. php? App = goods & act = drop
From index. php-> startup method of ECMall-> In this case, the do_action method in the GoodsApp class is requested. because this class does not exist, the parent class is found, then, one father goes up and finds the first do_action method until ECBaseApp is found, but the first do_action method is displayed, but the parent: do_action ($ action);-> so I ran to BaseApp again to find the method, finally, I am not jumping, but $ this-> _ run_action (); also makes me dumb:
Function _ run_action ()
{
$ Action = $ this-> _ curr_action;
$ This-> $ action ();
}
I output $ action here, but it is indeed drop, but there is no drop () in this class, and there is no drop in the parent class. Where does the program jump to then? Is the jump down (subclass? That's strange! Please give advice from PHP/ECMALL experts. I am very confused when I just got in touch with php. thank you very much for your help.
------ Best solution --------------------
/* Store category */
Function store ()
{
/* Get navigation */
$ This-> assign ('navs', $ this-> _ get_navs ());
/* Obtain the product category */
$ Scategorys = $ this-> _ list_scategory ();
/* Get the latest store */
$ New_stores = $ this-> _ new_stores (5 );
/* Obtain the recommended Store */
$ Recommended_stores = $ this-> _ recommended_stores (5 );
/* Current Location */
$ _ Curlocal = array (
Array (
'Text' => Lang: get ('index '),
'URL' => 'index. php ',
),
Array (
'Text' => Lang: get ('scategory '),
'URL' => '',
),
);
$ This-> assign ('_ curlocal', $ _ curlocal );
$ This-> assign ('New _ stores ', $ new_stores );
$ This-> assign ('recommended _ stores', $ recommended_stores );
$ This-> assign ('scategorys ', $ scategorys );
$ This-> assign ('page _ title', Lang: get ('store _ category '). '-'. conf: get ('site _ title '));
$ This-> display('category.store.html ');
Similar $ this-> assign ('goods _ list', $ var) is also available in drop );
Usage similar to smarty
------ Other solutions --------------------
No one has developed ecmall twice? Top