Documentation ¶
Index ¶
- func ExprType(sc *meta.Scope, cs *meta.ClassParseState, n node.Node) meta.TypesMap
- func ExprTypeCustom(sc *meta.Scope, cs *meta.ClassParseState, n node.Node, custom []CustomType) meta.TypesMap
- func ExprTypeLocal(sc *meta.Scope, cs *meta.ClassParseState, n node.Node) meta.TypesMap
- func ExprTypeLocalCustom(sc *meta.Scope, cs *meta.ClassParseState, n node.Node, custom []CustomType) meta.TypesMap
- func FindConstant(className string, constName string) (res meta.ConstantInfo, implClassName string, ok bool)
- func FindMethod(className string, methodName string) (res meta.FuncInfo, implClassName string, ok bool)
- func FindProperty(className string, propertyName string) (res meta.PropertyInfo, implClassName string, ok bool)
- func GetClassName(cs *meta.ClassParseState, classNode node.Node) (className string, ok bool)
- func GetConstant(cs *meta.ClassParseState, constNode node.Node) (constName string, ci meta.ConstantInfo, ok bool)
- func Implements(className string, interfaceName string) bool
- func ResolveTypes(curStaticClass string, m meta.TypesMap, visitedMap map[string]struct{}) map[string]struct{}
- type CustomType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExprType ¶
ExprType returns type of expression. Depending on whether or not is it "full mode", it will also recursively resolve all nested types
func ExprTypeCustom ¶
func ExprTypeCustom(sc *meta.Scope, cs *meta.ClassParseState, n node.Node, custom []CustomType) meta.TypesMap
ExprTypeCustom is ExprType that allows to specify custom types overrides
func ExprTypeLocal ¶
ExprTypeLocal is basic expression type that does not resolve cross-file function calls and such
func ExprTypeLocalCustom ¶
func ExprTypeLocalCustom(sc *meta.Scope, cs *meta.ClassParseState, n node.Node, custom []CustomType) meta.TypesMap
ExprTypeLocalCustom is ExprTypeLocal that allows to specify custom types
func FindConstant ¶
func FindConstant(className string, constName string) (res meta.ConstantInfo, implClassName string, ok bool)
FindConstant searches for a costant in specified class and returns actual class that contains the constant.
func FindMethod ¶
func FindMethod(className string, methodName string) (res meta.FuncInfo, implClassName string, ok bool)
FindMethod searches for a method in specified class
func FindProperty ¶
func FindProperty(className string, propertyName string) (res meta.PropertyInfo, implClassName string, ok bool)
FindProperty searches for a property in specified class (both static and instance properties)
func GetClassName ¶
GetClassName resolves class name for specified class node (as used in static calls, property fetch, etc)
func GetConstant ¶
func GetConstant(cs *meta.ClassParseState, constNode node.Node) (constName string, ci meta.ConstantInfo, ok bool)
GetConstant searches for specified constant in const fetch.
func Implements ¶
Implements checks if className implements interfaceName