C# Class Pchp.Library.Constants

Implements PHP function over constants.
Afficher le fichier Open project: iolevel/peachpie

Méthodes publiques

Méthode 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 méthode

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.
Résultat Pchp.Core.PhpValue

define() public static méthode

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.
Résultat bool

defined() public static méthode

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.
Résultat bool

get_defined_constants() public static méthode

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.
Résultat Pchp.Core.PhpArray