config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 18 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
	DoctrineDrivers       []DoctrineDriverMapping
	ResolveTargetEntities map[string]string
	// contains filtered or unexported fields
}

func NewContainerConfig

func NewContainerConfig() *ContainerConfig

func (*ContainerConfig) LoadFromXML

func (c *ContainerConfig) LoadFromXML(autoloadMap AutoloadMap)

func (*ContainerConfig) LoadTranslations added in v0.0.6

func (c *ContainerConfig) LoadTranslations()

func (*ContainerConfig) ResolveServiceId

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

ResolveServiceId 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 DoctrineDriverMapping added in v0.1.0

type DoctrineDriverMapping struct {
	Kind      DriverKind
	Namespace string
	Paths     []string
}

type DriverKind added in v0.1.0

type DriverKind string
const (
	DriverKindAttribute DriverKind = "attribute"
	DriverKindXML       DriverKind = "xml"
)

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