1
When I debug my program, I found &getDatabaseConnection() in databasefactory.php connect to database everytime. Then I found static $instance was lost after the function load. After read manual, I catch the bug:
$instance =& new $class();
should be:
$instance = new $class();