C# 클래스 Pchp.Library.Constants

Implements PHP function over constants.
파일 보기 프로젝트 열기: iolevel/peachpie

공개 메소드들

메소드 설명
constant ( Context ctx, string name ) : PhpValue

Retrieves a value of a constant.

define ( Context ctx, string name, PhpValue value, bool caseInsensitive = false ) : bool

Defines a constant.

defined ( Context ctx, string name ) : bool

Determines whether a constant is defined.

get_defined_constants ( Context ctx, bool categorize = false ) : PhpArray

Retrieves defined constants.

메소드 상세

constant() 공개 정적인 메소드

Retrieves a value of a constant.
public static constant ( Context ctx, string name ) : PhpValue
ctx Pchp.Core.Context Current runtime context.
name string The name of the constant.
리턴 Pchp.Core.PhpValue

define() 공개 정적인 메소드

Defines a constant.
public static define ( Context ctx, string name, PhpValue value, bool caseInsensitive = false ) : bool
ctx Pchp.Core.Context Current runtime context.
name string The name of the constant. Can be arbitrary string.
value Pchp.Core.PhpValue The value of the constant. Can be null or a scalar or array.
caseInsensitive bool Whether the name is case insensitive.
리턴 bool

defined() 공개 정적인 메소드

Determines whether a constant is defined.
public static defined ( Context ctx, string name ) : bool
ctx Pchp.Core.Context Current runtime context.
name string The name of the constant.
리턴 bool

get_defined_constants() 공개 정적인 메소드

Retrieves defined constants.
public static get_defined_constants ( Context ctx, bool categorize = false ) : PhpArray
ctx Pchp.Core.Context Current runtime context.
categorize bool Returns a multi-dimensional array with categories in the keys of the first dimension and constants and their values in the second dimension.
리턴 Pchp.Core.PhpArray