config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Psr4Resolve added in v0.0.4

func Psr4Resolve(className string, psr4Map Psr4Map, workspaceRoot string) (string, bool)

Types

type Config

type Config struct {
	Container *ContainerConfig
	Psr4      Psr4Map
	Routes    RoutesMap
	VendorDir string
	PhpPath   string
}

func NewConfig

func NewConfig() *Config

func (*Config) LoadPsr4Map

func (c *Config) LoadPsr4Map()

func (*Config) LoadRoutesMap added in v0.0.5

func (c *Config) LoadRoutesMap()

type ContainerConfig

type ContainerConfig struct {
	WorkspaceRoot     string
	ContainerXMLPath  string
	Roots             []string
	BundleRoots       map[string][]string
	ServiceClasses    map[string]string
	ServiceAliases    map[string]string
	TwigFunctions     map[string]protocol.Location
	ServiceReferences map[string]int
}

func NewContainerConfig

func NewContainerConfig() *ContainerConfig

func (*ContainerConfig) LoadFromXML

func (c *ContainerConfig) LoadFromXML(psr4Map Psr4Map)

Populates the Config.

func (*ContainerConfig) ResolveServiceId

func (c *ContainerConfig) ResolveServiceId(serviceID string) (string, bool)

Resolves a service ID to its class name.

type Psr4Map

type Psr4Map map[string][]string

func GetPsr4Map

func GetPsr4Map(autoloadFile, phpPath string) (Psr4Map, error)

type Route added in v0.0.5

type Route struct {
	Name       string
	Parameters []string
}

type RoutesMap added in v0.0.5

type RoutesMap map[string]Route

func GetRoutesMap added in v0.0.5

func GetRoutesMap(routesFile, phpPath string) (RoutesMap, error)

Jump to

Keyboard shortcuts

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