Example #1
0
 /**
  * Get a document object
  *
  * Returns a reference to the global {@link JDocument} object, only creating it
  * if it doesn't already exist.
  *
  * @access public
  * @return object JDocument
  */
 public static function &getDocument()
 {
     static $instance;
     if (!is_object($instance)) {
         $instance = JFactory::_createDocument();
     }
     return $instance;
 }
Example #2
0
 /**
  * Get a document object
  *
  * Returns the global {@link JDocument} object, only creating it
  * if it doesn't already exist.
  *
  * @return object JDocument
  */
 public static function getDocument()
 {
     if (!is_object(JFactory::$document)) {
         JFactory::$document = JFactory::_createDocument();
     }
     return JFactory::$document;
 }