Core Function isVarObj
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> isVarObj( $variable, <type> ) </pre> === Description === Check if a variable is an object type (This includes classes, file handles etc). === Parameters === ==== variab...") |
(→type) |
||
Line 31: | Line 31: | ||
"server" Is it a server created by using SSListen() | "server" Is it a server created by using SSListen() | ||
"client" Is it a client created by SSConnect() | "client" Is it a client created by SSConnect() | ||
− | "error" | + | "error" Something has gone wrong and this object is totally invalid |
</pre> | </pre> | ||
Revision as of 02:33, 24 August 2013
isVarObj( $variable, <type> )
Contents |
Description
Check if a variable is an object type (This includes classes, file handles etc).
Parameters
variable
The variable to check.
type
Optoinal; The type to check against valid types are:
[TYPE] [DETAILS] "class" Is it a CLASS (Any class) "file" Is it a File Handle "binary" Is it a binary variable "gui" Is it a GUI created from GUICreate() "guiobject" Is it a GUI object such as one created from GUICreateButton() "assembly" Is it a loaded .NET assembly DLL etc "method" Is it a method loaded from a .NET assembly "mysql" Is it a connection to a MySQL server "mysqldata" Is it a DataTable from MySQLFill() etc "dllstruct" Is it a C/C++ structure for use in in DLLCalls "object" Is it an unknown object such as one taken by GUIGetProp without a valid conversion "server" Is it a server created by using SSListen() "client" Is it a client created by SSConnect() "error" Something has gone wrong and this object is totally invalid
Default just checks if it IS an object type or not.
Return Value
Success: Returns 1.
Failure: Returns 0.
Remarks
None.
Example
$var1 = "check me"; println( "Is it?: " . isVarObj($var1) ); println( "Is it?: " . isVarObj($var1, "file") );