public static function get_instance()
 {
     if (!is_a(self::$instance, __CLASS__)) {
         self::$instance = true;
         self::$instance = new self();
         self::$instance->init();
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * Get networks array to pass to javascript
  * Set icon-sign values as icon values if icon-sign in use.
  * Strip remaining icon-sign values
  */
 public function get_networks()
 {
     $msi_frontend = MSI_Frontend::get_instance();
     $networks = $msi_frontend->networks;
     foreach ($networks as &$network) {
         if ('icon-sign' == $msi_frontend->type) {
             $network['icon'] = $network['icon-sign'];
         }
         unset($network['icon-sign']);
     }
     return $networks;
 }