pocketmine\updater\Upgrader::onRun PHP Method

onRun() public method

public onRun ( )
    public function onRun()
    {
        #if(!(\Phar::running(true) === "")){
        $file_name = $this->dfile;
        $downloaded_file = file_get_contents($this->dlink);
        if ($downloaded_file) {
            if (md5($downloaded_file) == $this->md5hash) {
                rename($file_name, $file_name . time() . '.bak');
                file_put_contents($file_name, $downloaded_file);
            } else {
                $this->status = false;
            }
        } else {
            $this->status = false;
        }
        #}else{
        #$this->status = false;
        #}
    }