C# 클래스 Pchp.CodeAnalysis.NameUtils

파일 보기 프로젝트 열기: iolevel/peachpie 1 사용 예제들

공개 메소드들

메소드 설명
AsVarName ( string varname ) : string

Gets variable name without leading $.

ClrName ( this qname ) : string

Gets CLR name using dot as a name separator.

GetNamingContext ( NamespaceDecl ns, SourceUnit unit ) : NamingContext

Create naming context.

GetNamingContext ( TypeDecl type ) : NamingContext

Create naming context in context of given type declaration.

GetNamingContext ( this routine ) : NamingContext

Create naming context.

IsEmpty ( this qname ) : bool

Gets value indicating whether given qualified name was not set.

IsGlobalVar ( ItemUse itemUse ) : bool

Gets value indicating whether the expression is in form of $GLOBALS[...].

MakeQualifiedName ( Name name, NamespaceDecl ns ) : QualifiedName

Combines name and its namespace.

MakeQualifiedName ( string name, bool fullyQualified ) : QualifiedName

Make QualifiedName from the string like AAA\BBB\XXX

MakeQualifiedName ( this type ) : QualifiedName

Gets full qualified name of the type declaration.

NamesEquals ( this names1, Name names2 ) : bool

Compares two arrays.

TryGetGlobalVarName ( ItemUse itemUse, VariableName &varname ) : bool

Tries to resolve global variable name from array item use. (eg. $GLOBALS["varname"]).

메소드 상세

AsVarName() 공개 정적인 메소드

Gets variable name without leading $.
public static AsVarName ( string varname ) : string
varname string String in form of $varname or $GLOBALS['varname'] or 'varname'
리턴 string

ClrName() 공개 정적인 메소드

Gets CLR name using dot as a name separator.
public static ClrName ( this qname ) : string
qname this
리턴 string

GetNamingContext() 공개 정적인 메소드

Create naming context.
public static GetNamingContext ( NamespaceDecl ns, SourceUnit unit ) : NamingContext
ns NamespaceDecl Current namespace declaration. In case it is null, context for global code is created.
unit SourceUnit Global code used when is null.
리턴 NamingContext

GetNamingContext() 공개 정적인 메소드

Create naming context in context of given type declaration.
public static GetNamingContext ( TypeDecl type ) : NamingContext
type TypeDecl
리턴 NamingContext

GetNamingContext() 공개 정적인 메소드

Create naming context.
public static GetNamingContext ( this routine ) : NamingContext
routine this
리턴 NamingContext

IsEmpty() 공개 정적인 메소드

Gets value indicating whether given qualified name was not set.
public static IsEmpty ( this qname ) : bool
qname this
리턴 bool

IsGlobalVar() 공개 정적인 메소드

Gets value indicating whether the expression is in form of $GLOBALS[...].
public static IsGlobalVar ( ItemUse itemUse ) : bool
itemUse ItemUse
리턴 bool

MakeQualifiedName() 공개 정적인 메소드

Combines name and its namespace.
public static MakeQualifiedName ( Name name, NamespaceDecl ns ) : QualifiedName
name Name Name.
ns NamespaceDecl Can be null.
리턴 QualifiedName

MakeQualifiedName() 공개 정적인 메소드

Make QualifiedName from the string like AAA\BBB\XXX
public static MakeQualifiedName ( string name, bool fullyQualified ) : QualifiedName
name string
fullyQualified bool
리턴 QualifiedName

MakeQualifiedName() 공개 정적인 메소드

Gets full qualified name of the type declaration.
public static MakeQualifiedName ( this type ) : QualifiedName
type this Type, cannot be null.
리턴 QualifiedName

NamesEquals() 공개 정적인 메소드

Compares two arrays.
public static NamesEquals ( this names1, Name names2 ) : bool
names1 this
names2 Name
리턴 bool

TryGetGlobalVarName() 공개 정적인 메소드

Tries to resolve global variable name from array item use. (eg. $GLOBALS["varname"]).
public static TryGetGlobalVarName ( ItemUse itemUse, VariableName &varname ) : bool
itemUse ItemUse
varname VariableName
리턴 bool