mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
✨ Allow installation and removal of extensions (#266)
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
//
|
||||
// BrewExtensionsObservable.swift
|
||||
// PHP Monitor
|
||||
//
|
||||
// Created by Nico Verbruggen on 21/11/2023.
|
||||
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class BrewExtensionsObservable: ObservableObject {
|
||||
@Published var extensions: [BrewPhpExtension] = []
|
||||
|
||||
public func loadExtensionData(for version: String) {
|
||||
let tapFormulae = BrewTapFormulae.from(tap: "shivammathur/homebrew-extensions")
|
||||
|
||||
if let filteredTapFormulae = tapFormulae[version] {
|
||||
self.extensions = filteredTapFormulae
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user