C# Класс Pchp.Library.Variables

Показать файл Открыть проект

Открытые методы

Метод Описание
@sizeof ( PhpValue variable, int mode = COUNT_NORMAL ) : long

Counts items in a variable.

If any item of the variable contains infinite recursion skips items that are repeating because of such recursion.

boolval ( PhpValue variable ) : bool

Converts to boolean.

count ( PhpValue variable, int mode = COUNT_NORMAL ) : long

Counts items in a variable.

If any item of the variable contains infinite recursion skips items that are repeating because of such recursion.

doubleval ( PhpValue variable ) : double

Converts to double.

floatval ( PhpValue variable ) : double

Converts to double.

gettype ( PhpValue variable ) : string

Retrieves name of a variable type.

intval ( PhpValue variable ) : long

Converts to integer.

intval ( PhpValue variable, int @base ) : long

Converts to integer using a specified base.

is_array ( PhpValue variable ) : bool

Checks whether a dereferenced variable is an PhpArray.

is_bool ( PhpValue variable ) : bool

Checks whether a dereferenced variable is boolean.

is_callable ( Context ctx, PhpValue variable, bool syntaxOnly, string &callableName ) : bool

Verifies that the contents of a variable can be called as a function.

is_callable ( PhpValue variable, bool syntaxOnly = false ) : bool

Verifies that the contents of a variable can be called as a function.

is_double ( PhpValue variable ) : bool

Checks whether a dereferenced variable is double. Alias for is_float().

is_float ( PhpValue variable ) : bool

Checks whether a dereferenced variable is double.

is_int ( PhpValue variable ) : bool

Checks whether a dereferenced variable is integer.

is_integer ( PhpValue variable ) : bool

Checks whether a dereferenced variable is integer. Alias for is_int().

is_long ( PhpValue variable ) : bool

Checks whether a dereferenced variable is long. TODO: Alias for is_int(). But not in Phalanger.

is_null ( PhpValue variable ) : bool

Checks whether a dereferenced variable is a null reference.

is_numeric ( PhpValue variable ) : bool

Checks whether a dereferenced variable is numeric.

is_object ( PhpValue variable ) : bool

Checks whether a dereferenced variable is Core.Reflection.DObject.

is_real ( PhpValue variable ) : bool

Checks whether a dereferenced variable is double. Alias for is_float().

is_resource ( PhpValue variable ) : bool

Checks whether a dereferenced variable is a valid PhpResource.

is_scalar ( PhpValue variable ) : bool

Checks whether a dereferenced variable is a scalar.

is_string ( PhpValue variable ) : bool

Checks whether a dereferenced variable is string.

print_r ( Context ctx, PhpValue value, bool returnString = false ) : PhpValue

Outputs or returns human-readable information about a variable.

settype ( Context ctx, PhpValue &variable, string type ) : bool

Sets variable's type.

strval ( Context ctx, PhpValue variable ) : string

Converts to string.

var_dump ( Context ctx ) : void

Dumps variables.

var_export ( Context ctx, PhpValue variable, bool returnString = false ) : string

Outputs or returns a pars-able string representation of a variable.

Приватные методы

Метод Описание
get_resource_type ( PhpResource resource ) : string

Описание методов

@sizeof() публичный статический Метод

Counts items in a variable.
If any item of the variable contains infinite recursion skips items that are repeating because of such recursion.
public static @sizeof ( PhpValue variable, int mode = COUNT_NORMAL ) : long
variable Pchp.Core.PhpValue The variable which items to count.
mode int Whether to count recursively.
Результат long

boolval() публичный статический Метод

Converts to boolean.
public static boolval ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

count() публичный статический Метод

Counts items in a variable.
If any item of the variable contains infinite recursion skips items that are repeating because of such recursion.
public static count ( PhpValue variable, int mode = COUNT_NORMAL ) : long
variable Pchp.Core.PhpValue The variable which items to count.
mode int Whether to count recursively.
Результат long

doubleval() публичный статический Метод

Converts to double.
public static doubleval ( PhpValue variable ) : double
variable Pchp.Core.PhpValue The variable.
Результат double

floatval() публичный статический Метод

Converts to double.
public static floatval ( PhpValue variable ) : double
variable Pchp.Core.PhpValue The variable.
Результат double

gettype() публичный статический Метод

Retrieves name of a variable type.
public static gettype ( PhpValue variable ) : string
variable Pchp.Core.PhpValue The variable.
Результат string

intval() публичный статический Метод

Converts to integer.
public static intval ( PhpValue variable ) : long
variable Pchp.Core.PhpValue The variable.
Результат long

intval() публичный статический Метод

Converts to integer using a specified base.
public static intval ( PhpValue variable, int @base ) : long
variable Pchp.Core.PhpValue The variable.
@base int
Результат long

is_array() публичный статический Метод

Checks whether a dereferenced variable is an PhpArray.
public static is_array ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_bool() публичный статический Метод

Checks whether a dereferenced variable is boolean.
public static is_bool ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_callable() публичный статический Метод

Verifies that the contents of a variable can be called as a function.
public static is_callable ( Context ctx, PhpValue variable, bool syntaxOnly, string &callableName ) : bool
ctx Pchp.Core.Context Current runtime context.
variable Pchp.Core.PhpValue The variable.
syntaxOnly bool If true, it is only checked that has /// a valid structure to be used as a callback. if false, the existence of the function (or /// method) is also verified.
callableName string Receives the name of the function or method (for example /// SomeClass::SomeMethod).
Результат bool

is_callable() публичный статический Метод

Verifies that the contents of a variable can be called as a function.
public static is_callable ( PhpValue variable, bool syntaxOnly = false ) : bool
variable Pchp.Core.PhpValue The variable.
syntaxOnly bool If true, it is only checked that has /// a valid structure to be used as a callback. if false, the existence of the function (or /// method) is also verified.
Результат bool

is_double() публичный статический Метод

Checks whether a dereferenced variable is double. Alias for is_float().
public static is_double ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_float() публичный статический Метод

Checks whether a dereferenced variable is double.
public static is_float ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_int() публичный статический Метод

Checks whether a dereferenced variable is integer.
public static is_int ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_integer() публичный статический Метод

Checks whether a dereferenced variable is integer. Alias for is_int().
public static is_integer ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_long() публичный статический Метод

Checks whether a dereferenced variable is long. TODO: Alias for is_int(). But not in Phalanger.
public static is_long ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_null() публичный статический Метод

Checks whether a dereferenced variable is a null reference.
public static is_null ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_numeric() публичный статический Метод

Checks whether a dereferenced variable is numeric.
public static is_numeric ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_object() публичный статический Метод

Checks whether a dereferenced variable is Core.Reflection.DObject.
public static is_object ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_real() публичный статический Метод

Checks whether a dereferenced variable is double. Alias for is_float().
public static is_real ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_resource() публичный статический Метод

Checks whether a dereferenced variable is a valid PhpResource.
public static is_resource ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_scalar() публичный статический Метод

Checks whether a dereferenced variable is a scalar.
public static is_scalar ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

is_string() публичный статический Метод

Checks whether a dereferenced variable is string.
public static is_string ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
Результат bool

print_r() публичный статический Метод

Outputs or returns human-readable information about a variable.
public static print_r ( Context ctx, PhpValue value, bool returnString = false ) : PhpValue
ctx Pchp.Core.Context Current runtime context.
value Pchp.Core.PhpValue The variable.
returnString bool Whether to return a string representation.
Результат Pchp.Core.PhpValue

settype() публичный статический Метод

Sets variable's type.
has invalid value.
public static settype ( Context ctx, PhpValue &variable, string type ) : bool
ctx Pchp.Core.Context Current runtime context.
variable Pchp.Core.PhpValue The variable.
type string The string identifying a new type. See PHP manual for details.
Результат bool

strval() публичный статический Метод

Converts to string.
public static strval ( Context ctx, PhpValue variable ) : string
ctx Pchp.Core.Context Current runtime context.
variable Pchp.Core.PhpValue The variable.
Результат string

var_dump() публичный статический Метод

Dumps variables.
public static var_dump ( Context ctx ) : void
ctx Pchp.Core.Context Current runtime context.
Результат void

var_export() публичный статический Метод

Outputs or returns a pars-able string representation of a variable.
public static var_export ( Context ctx, PhpValue variable, bool returnString = false ) : string
ctx Pchp.Core.Context Current runtime context.
variable Pchp.Core.PhpValue The variable.
returnString bool Whether to return a string representation.
Результат string