phpstore

package module
v1.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: AGPL-3.0 Imports: 15 Imported by: 3

README

PHP Store

PHP Store allows to find and manage local PHP installations.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PHPStore

type PHPStore struct {
	// contains filtered or unexported fields
}

PHPStore stores information about all locally installed PHP versions

func New

func New(configDir string, reload bool, logger func(msg string, a ...interface{})) *PHPStore

New creates a new PHP store

func (*PHPStore) BestVersionForDir

func (s *PHPStore) BestVersionForDir(dir string) (*Version, string, string, error)

BestVersionForDir returns the configured PHP version for the given PHP script

func (*PHPStore) IsVersionAvailable

func (s *PHPStore) IsVersionAvailable(version string) bool

func (*PHPStore) Versions

func (s *PHPStore) Versions() []*Version

Versions returns all available PHP versions

type Version

type Version struct {
	FullVersion   *version.Version `json:"-"`
	Version       string           `json:"version"`
	Path          string           `json:"path"`
	PHPPath       string           `json:"php_path"`
	FPMPath       string           `json:"fpm_path"`
	CGIPath       string           `json:"cgi_path"`
	PHPConfigPath string           `json:"php_config_path"`
	PHPizePath    string           `json:"phpize_path"`
	PHPdbgPath    string           `json:"phpdbg_path"`
	IsSystem      bool             `json:"is_system"`
	FrankenPHP    bool             `json:"frankenphp"`
}

Version stores information about an installed PHP version

func (*Version) IsCGIServer

func (v *Version) IsCGIServer() bool

func (*Version) IsCLIServer

func (v *Version) IsCLIServer() bool

func (*Version) IsFPMServer

func (v *Version) IsFPMServer() bool

func (*Version) IsFrankenPHPServer added in v1.0.6

func (v *Version) IsFrankenPHPServer() bool

func (*Version) ServerPath

func (v *Version) ServerPath() string

func (*Version) ServerTypeName

func (v *Version) ServerTypeName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL