Ejemplo n.º 1
0
 public static function getInstance()
 {
     if (!isset(self::$libraryInstance)) {
         self::$libraryInstance = new JFBConnectFacebookLibrary();
         // After the instance is grabbed, get the Javascript code to insert
         // Don't do this in the constructor as inititing the Javascript calls functions which need
         //   this very instance
         $app = JFactory::getApplication();
         if (!$app->isAdmin()) {
             self::$libraryInstance->initDocument();
         }
     }
     return self::$libraryInstance;
 }