The discovery today of the need to call subclasses in the parent class has never been used before and is also possible through practice. Examples such as:
 
 
 
  
  Copy Code code as follows: 
 
 
  
 
 <?php 
 
/** 
 
* Parent class calling subclass method base class 
 
* @author LNMP100 
 
* 
 
*/ 
 
Class Baseapp 
 
{ 
 
/** 
 
* Call Subclass Method 
 
* @version Date Created: 2013-07-10 
 
*/ 
 
function _run_action () 
 
{ 
 
$action = "index"; 
 
$this-> $action (); 
 
} 
 
} 
 
 
  
 
 Class Defaultapp extends Baseapp
{
  
 
 /**
* This method will call in the parent class
*/
Function index ()
{
echo "Defaultapp->index () invoked";
}
  
 
 function Go () {
Calling the parent class
Parent::_run_action ();
}
}
  
 
 $default =new Defaultapp ();
$default->go ();
Defaultapp->index () will be displayed invoked
  
 
 ?>
  
  
 
But it feels like it's not a parent-class, it's a subclass of the way it is, because instantiation is a subclass, and if you instantiate the parent class, then you have a problem with the way the class is toned.