假设我有 3 个类和方法;
文件1.php
class A
{
public function insert()
{
/* some code to do something with DB */
}
}
文件2.php
需要file1.php
class B extends A
{
public function sample()
{
/* doing something random */
}
}
文件3.php
需要file2.php
class C extends B
{
public function something()
{
$this->insert(); //In here I want to use it like $this->A->insert(); OR $A->insert();
}
}