config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoloadResolve added in v0.0.6

func AutoloadResolve(className string, autoloadMap AutoloadMap, workspaceRoot string) (string, bool)

Types

type AutoloadMap added in v0.0.6

type AutoloadMap struct {
	PSR4     map[string][]string
	Classmap map[string]string
}

func GetAutoloadMap added in v0.0.6

func GetAutoloadMap(psr4File, classmapFile, phpPath string) (AutoloadMap, error)

func NewAutoloadMap added in v0.0.6

func NewAutoloadMap() AutoloadMap

func (AutoloadMap) IsEmpty added in v0.0.6

func (m AutoloadMap) IsEmpty() bool

type Config

type Config struct {
	Container *ContainerConfig
	Autoload  AutoloadMap
	Routes    RoutesMap
	VendorDir string
	PhpPath   string
}

func NewConfig

func NewConfig() *Config

func (*Config) LoadAutoloadMap added in v0.0.6

func (c *Config) LoadAutoloadMap()

func (*Config) LoadRoutesMap added in v0.0.5

func (c *Config) LoadRoutesMap()

func (*Config) LoadTranslations added in v0.0.6

func (c *Config) LoadTranslations()

type ContainerConfig

type ContainerConfig struct {
	WorkspaceRoot     string
	ContainerXMLPaths []string
	Roots             []string
	BundleRoots       map[string][]string
	ServiceClasses    map[string]string
	ServiceAliases    map[string]string
	TwigFunctions     map[string]protocol.Location
	ServiceReferences map[string]int
	TranslationRoots  []string
	TranslationKeys   translations.TranslationMap
	DefaultLocale     string
	// contains filtered or unexported fields
}

func NewContainerConfig

func NewContainerConfig() *ContainerConfig

func (*ContainerConfig) LoadFromXML

func (c *ContainerConfig) LoadFromXML(autoloadMap AutoloadMap)

Populates the Config.

func (*ContainerConfig) LoadTranslations added in v0.0.6

func (c *ContainerConfig) LoadTranslations()

func (*ContainerConfig) ResolveServiceId

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

Resolves a service ID to its class name.

func (*ContainerConfig) SetContainerXMLPaths added in v0.0.6

func (c *ContainerConfig) SetContainerXMLPaths(paths []string)

SetContainerXMLPaths replaces the configured container XML paths while keeping order and uniqueness.

func (*ContainerConfig) TwigTemplates added in v0.0.6

func (c *ContainerConfig) TwigTemplates() []string

TwigTemplates returns the set of twig template identifiers discovered from configured roots.

type Route added in v0.0.5

type Route struct {
	Name       string
	Parameters []string
	Controller string
	Action     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