C# Class Pchp.Library.Constants

Implements PHP function over constants.
Mostrar archivo Open project: iolevel/peachpie

Public Methods

Method Description
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.

Method Details

constant() public static method

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.
return Pchp.Core.PhpValue

define() public static method

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.
return bool

defined() public static method

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.
return bool

get_defined_constants() public static method

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.
return Pchp.Core.PhpArray