Ejemplo n.º 1
0
 /**
  * Uninstall webtools
  *
  * @param  string $path
  * @return void
  */
 public static function uninstall($path)
 {
     $path = rtrim(realpath($path), '/') . '/';
     if (PHP_OS == 'WINNT') {
         $path = str_replace("\\", '/', $path);
     }
     if (!is_dir($path . 'public/')) {
         throw new \Exception('Document root cannot be located');
     }
     TBootstrap::uninstall($path);
     CodeMirror::uninstall($path);
     if (is_file($path . 'public/webtools.config.php')) {
         unlink($path . 'public/webtools.config.php');
     }
     if (is_file($path . 'public/webtools.php')) {
         unlink($path . 'public/webtools.php');
     }
 }