Many of the core classes in Joomla! use a special method called
getInstance(). There are three main reasons for using the
JDatabaseobject as an example. We can access this object at any time using the static
JFactory::getDBO()method. If we were unable to do this, we would need to continually pass the object around or declare it global in every method and function that required it.