Documentation
¶
Index ¶
- Variables
- func DefaultCacheDir() string
- func DefaultGraphsDir() string
- func Exists(path string) (bool, error)
- func GenIndent(level int) string
- func IsEmbeddedConstant(name string) bool
- func IsSuperGlobal(name string) bool
- func NameToIdentifier(str string) string
- func NormalizeSlashes(str string) string
- func OpenFile(url string) error
- func Percent(x, y int64) float64
- func ResolveRequirePath(st *meta.ClassParseState, projectPath string, e ir.Node) (string, bool)
- func Unquote(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var NameToIdentifierRegexp = regexp.MustCompile("[^a-zA-Z0-9]")
Functions ¶
func DefaultCacheDir ¶
func DefaultCacheDir() string
func DefaultGraphsDir ¶ added in v0.3.0
func DefaultGraphsDir() string
func IsEmbeddedConstant ¶ added in v0.3.0
func IsSuperGlobal ¶ added in v0.3.0
func NameToIdentifier ¶
func NormalizeSlashes ¶
func ResolveRequirePath ¶
ResolveRequirePath resolves the path for the passed expression based on the project path and current state.
For the function to resolve the path correctly, the passed expression must be constant, otherwise, an empty string and a false flag will be returned.
Example:
require_once "./file.php"; // Correct require_once __DIR__ ."/file.php"; // Correct require_once some_root(__DIR__) ."/file.php"; // Incorrect, some_root function is not constant
Note: For testing using package import, you need to take into account that the www folder is added to the path, so for all new tests, all test files must be placed in the www folder for golden tests, or the www folder must be added to the path for other tests for the imports to work correctly.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.