Hi Guys,
I noticed that in some apps people tend to use the following method in classes without instantiating an instance or defining objects, but this works, could someone explain whether this is a correct way of doing it. (its for a simple data management and interface app)
For eg. In the model:
class getRecords {
public function getAllRecords ()
{
//get records from db
}
}
In the controller:
$records = getRecords::getAllRecords();