public static function uninstall($path, $options = [])
    {
        $options = array_merge(self::$options, $options);
        if (!self::isValidDestination($path, $options['exclude_checks'])
        ) {
            return false;
        }

        $installer_file_folder = $path;
        $is_install = false;
        $installer = self::loadInstaller($installer_file_folder, $is_install);

        if ($installer && method_exists($installer, 'preUninstall')) {
            $method_result = $installer::preUninstall();
            if ($method_result !== true) {
                self::$error = 'An error occurred';
                if (is_string($method_result)) {
                    self::$error = $method_result;
                }

                return false;
            }
        }

        $result = Folder::delete($path);

        self::$message = '';
        if ($result && $installer && method_exists($installer, 'postUninstall')) {
            self::$message = $installer::postUninstall();
        }

        return $result;
    }
public static function uninstall($path, $options = [])
    {
        $options = array_merge(self::$options, $options);
        if (!self::isValidDestination($path, $options['exclude_checks'])
        ) {
            return false;
        }

        $installer_file_folder = $path;
        $is_install = false;
        $installer = self::loadInstaller($installer_file_folder, $is_install);

        if ($installer && method_exists($installer, 'preUninstall')) {
            $method_result = $installer::preUninstall();
            if ($method_result !== true) {
                self::$error = 'An error occurred';
                if (is_string($method_result)) {
                    self::$error = $method_result;
                }

                return false;
            }
        }

        $result = Folder::delete($path);

        self::$message = '';
        if ($result && $installer && method_exists($installer, 'postUninstall')) {
            self::$message = $installer::postUninstall();
        }

        return $result;
    }
public static function uninstall ( $ path , $ options = [ ] ) { $ options = array_merge ( self :: $ options , $ options ) ; if ( ! self :: isValidDestination ( $ path , $ options [ 'exclude_checks' ] ) ) { return false ; } $ installer_file_folder = $ path ; $ is_install = false ; $ installer = self :: loadInstaller ( $ installer_file_folder , $ is_install ) ; if ( $ installer && method_exists ( $ installer , 'preUninstall' ) ) { $ method_result = $ installer :: preUninstall ( ) ; if ( $ method_result !== true ) { self :: $ error = 'An error occurred' ; if ( is_string ( $ method_result ) ) { self :: $ error = $ method_result ; } return false ; } } $ result = Folder :: delete ( $ path ) ; self :: $ message = '' ; if ( $ result && $ installer && method_exists ( $ installer , 'postUninstall' ) ) { self :: $ message = $ installer :: postUninstall ( ) ; } return $ result ; }
Uninstalls one or more given package

@param  string $path    The slug of the package(s)
@param  array  $options Options to use for uninstalling

@return bool True if everything went fine, False otherwise.
Uninstalls one or more given package