コード例 #1
0
 public function checkPluginVersion()
 {
     $pv = $this->_raproxy->getVersion();
     if ($pv == '0.0.0') {
         $this->log("Remote Agent Not found at " . $this->_raproxy->getRemoteAgentUrl(), "startup");
     } else {
         $this->log("Remote Agent v{$pv} found at " . $this->_raproxy->getRemoteAgentUrl(), "startup");
     }
     $cv = Magmi_RemoteAgent::getStaticVersion();
     if ($pv < $cv) {
         $this->log("Deploying latest v{$cv}");
         $ok = $this->deployPlugin(Magmi_Config::getInstance()->getMagentoDir());
         if ($ok) {
             $cpv = $this->_raproxy->getVersion();
             $this->log("Remote Agent v{$cpv} deployed at " . $this->_raproxy->getRemoteAgentUrl(), "startup");
         }
     }
     $this->_active = true;
 }
コード例 #2
0
 public static function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new Magmi_RemoteAgent();
     }
     return self::$_instance;
 }