I have the following problem - lets say I have a class named Database
class Database
{
   public function insert(...)
   {
    //insert something in the database
   }
}
And I have a class named User
class User
{
   public function register(..)
   {
       //validate the user , and insert him
       //here i need to call insert() function from Database class
   }
}
Is there a simple way in which I can call the insert method inside the User class?
 
     
     
     
    