Documentation
¶
Overview ¶
Package runtime provides functionality for discovering and managing the PHP execution environment required to interact with a Laravel project at runtime. It encapsulates the process of locating a valid PHP binary and executing PHP code to retrieve essential project information
By abstracting the PHP process management details, the runtime package allows client code to seamlessly obtain runtime information without manually handling PHP code,execution or file discovery. This design helps in maintaining a clear separation of concerns.
Key features:
- Locate and validate the PHP executable for the target Laravel project.
- Execute PHP code to extract project data.
- Provide structured access to configuration and application binding data via repository types.
The package is intended to be used as a foundation for tools that need to analyze or interact with Laravel projects by leveraging runtime information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoBinary = errors.New("failed to find php binary")
Functions ¶
Types ¶
type PHPProcess ¶ added in v0.0.9
type PHPProcess struct {
Args []string
}
PHPProcess represents a PHP execution process with configurable arguments.
func FindPHPProcess ¶
func FindPHPProcess(rootPath string) (*PHPProcess, error)
func NewPHPProcess ¶
func NewPHPProcess(args ...string) *PHPProcess
NewPHPProcess creates a new PHPProcess instance with the given arguments.
type PHPProcessLocator ¶
type PHPProcessLocator func() *PHPProcess
PHPProcessLocator is a function type that returns a pointer to a PHPProcess. It's used to locate a valid PHP executable in different environments.