Exemplo n.º 1
0
 /**
  * Definizione della funzione costruttore che viene richiamata
  * nel momento della creazione di un'istanza con questa classe
  */
 function __construct()
 {
     // Quando la classe viene utilizzata da una definzione di un modulo questa
     // funzione deve essere implementata per la configurazione delle opzioni
     $this->moduleAddSetup();
     // Se viene definito un nome di classe memorizzo il riferimento oggetto
     // in una variabile statica da utilizzare nelle funzioni esterne
     if (isset($this->moduleClassName)) {
         if ($this->moduleClassName == 'SZGoogleModulePlus') {
             self::$SZGoogleModulePlus = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleAnalytics') {
             self::$SZGoogleModuleAnalytics = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleAuthenticator') {
             self::$SZGoogleModuleAuthenticator = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleCalendar') {
             self::$SZGoogleModuleCalendar = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleDrive') {
             self::$SZGoogleModuleDrive = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleFonts') {
             self::$SZGoogleModuleFonts = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleGroups') {
             self::$SZGoogleModuleGroups = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleHangouts') {
             self::$SZGoogleModuleHangouts = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModulePanoramio') {
             self::$SZGoogleModulePanoramio = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleTranslate') {
             self::$SZGoogleModuleTranslate = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleYoutube') {
             self::$SZGoogleModuleYoutube = $this;
         }
     }
     // Esecuzione dei componenti esistenti legati al modulo come
     // le azioni generali e la generazione di shortcode e widget
     if ($this->moduleOptionSet) {
         $this->moduleAddActions();
         $this->moduleAddShortcodes();
         $this->moduleAddWidgets();
     }
 }
Exemplo n.º 2
0
 /**
  * Definition the constructor function, which is called
  * at the time of the creation of an instance of this class
  */
 function __construct()
 {
     // When the class is used by a definition of a module, this
     // function must be implemented by configuring the options
     $this->moduleAddSetup();
     // If you define a class name memorize the reference object
     // in a static variable for use in external functions
     if (isset($this->moduleClassName)) {
         if ($this->moduleClassName == 'SZGoogleModulePlus') {
             self::$SZGoogleModulePlus = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleAjax') {
             self::$SZGoogleModuleAjax = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleAnalytics') {
             self::$SZGoogleModuleAnalytics = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleAuthenticator') {
             self::$SZGoogleModuleAuthenticator = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleCalendar') {
             self::$SZGoogleModuleCalendar = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleDrive') {
             self::$SZGoogleModuleDrive = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleFonts') {
             self::$SZGoogleModuleFonts = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleGroups') {
             self::$SZGoogleModuleGroups = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleHangouts') {
             self::$SZGoogleModuleHangouts = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleMaps') {
             self::$SZGoogleModuleMaps = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModulePanoramio') {
             self::$SZGoogleModulePanoramio = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleRecaptcha') {
             self::$SZGoogleModuleRecaptcha = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleTranslate') {
             self::$SZGoogleModuleTranslate = $this;
         }
         if ($this->moduleClassName == 'SZGoogleModuleYoutube') {
             self::$SZGoogleModuleYoutube = $this;
         }
     }
     // Implementation of existing components related to the module as
     // the general operations and the generation of shortcodes and widgets
     if ($this->moduleOptionSet) {
         $this->moduleAddActions();
         $this->moduleAddShortcodes();
         $this->moduleAddWidgets();
     }
 }