אם הבנתי אותך נכון, יש לך מחלקה, שאתה רוצה לעשות שימוש בפונקציה שלה, בתוך פונקציה של מחלקה אחרת?
אם לזה התכוונת,
PHP קוד:
class firstClass()
{
function myfunction()
{
global $secondClass; // import the class you want to use
$secondClass -> someFuncionn(); // now you can use the second's class functions
}
}
שכחתי לציין, ניתן לעשות שימוש במספר מחלקות בו זמנית בעזרת Global:
PHP קוד:
global $DB,$secure,$html,$bla....;