C# Class Pchp.Library.Variables

Mostrar archivo Open project: iolevel/peachpie

Public Methods

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

Private Methods

Method Description
get_resource_type ( PhpResource resource ) : string

Method Details

@sizeof() public static method

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

boolval() public static method

Converts to boolean.
public static boolval ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

count() public static method

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

doubleval() public static method

Converts to double.
public static doubleval ( PhpValue variable ) : double
variable Pchp.Core.PhpValue The variable.
return double

floatval() public static method

Converts to double.
public static floatval ( PhpValue variable ) : double
variable Pchp.Core.PhpValue The variable.
return double

gettype() public static method

Retrieves name of a variable type.
public static gettype ( PhpValue variable ) : string
variable Pchp.Core.PhpValue The variable.
return string

intval() public static method

Converts to integer.
public static intval ( PhpValue variable ) : long
variable Pchp.Core.PhpValue The variable.
return long

intval() public static method

Converts to integer using a specified base.
public static intval ( PhpValue variable, int @base ) : long
variable Pchp.Core.PhpValue The variable.
@base int
return long

is_array() public static method

Checks whether a dereferenced variable is an PhpArray.
public static is_array ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_bool() public static method

Checks whether a dereferenced variable is boolean.
public static is_bool ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_callable() public static method

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

is_callable() public static method

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

is_double() public static method

Checks whether a dereferenced variable is double. Alias for is_float().
public static is_double ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_float() public static method

Checks whether a dereferenced variable is double.
public static is_float ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_int() public static method

Checks whether a dereferenced variable is integer.
public static is_int ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_integer() public static method

Checks whether a dereferenced variable is integer. Alias for is_int().
public static is_integer ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_long() public static method

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

is_null() public static method

Checks whether a dereferenced variable is a null reference.
public static is_null ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_numeric() public static method

Checks whether a dereferenced variable is numeric.
public static is_numeric ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_object() public static method

Checks whether a dereferenced variable is Core.Reflection.DObject.
public static is_object ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_real() public static method

Checks whether a dereferenced variable is double. Alias for is_float().
public static is_real ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_resource() public static method

Checks whether a dereferenced variable is a valid PhpResource.
public static is_resource ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_scalar() public static method

Checks whether a dereferenced variable is a scalar.
public static is_scalar ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

is_string() public static method

Checks whether a dereferenced variable is string.
public static is_string ( PhpValue variable ) : bool
variable Pchp.Core.PhpValue The variable.
return bool

print_r() public static method

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

settype() public static method

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

strval() public static method

Converts to string.
public static strval ( Context ctx, PhpValue variable ) : string
ctx Pchp.Core.Context Current runtime context.
variable Pchp.Core.PhpValue The variable.
return string

var_dump() public static method

Dumps variables.
public static var_dump ( Context ctx ) : void
ctx Pchp.Core.Context Current runtime context.
return void

var_export() public static method

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