I have a class Database in database.php with 145 functions(17,000 lines) and now i've read this is bad practice, so i want sort out the functions correctly into specific classes rather than a "God" Class.
What i want to know is how do i call a function from another class? Below is an example; How do i call function two from within function one?
database.php
require("connect.php");
class Database {
private $connect;
function one() {
//call function two
}
}
forms.php
require("connect.php");
class Forms {
private $connect;
function two() {
//returns forms
}
}
How do i do this?