コード例 #1
0
ファイル: template.php プロジェクト: Rikisha/proj
 /**
  * Returns a refernce to the global ZenGridTemplate object, only creating it if it doesn't already exist.
  *
  * This method must be invoked as: $zgf = ZenGridTemplate::getInstance();
  *
  * @return  ZenGridTemplate
  *
  * @since   1.0.0
  */
 public static function getInstance()
 {
     // Only create the object if it doesn't exist.
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
ファイル: framework.php プロジェクト: Rikisha/proj
 public function __construct($plugin = null)
 {
     $this->app = JFactory::getApplication();
     $this->doc = JFactory::getDocument();
     $this->plugin = $plugin;
     self::$isJ15 = version_compare(JVERSION, '1.6', '<');
     if (is_object($this->plugin)) {
         $this->plugin->loadLanguage();
     }
     $this->template = ZenGridTemplate::getInstance();
 }