Core Function FunctionInfo
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> FunctionInfo( <function-name> ) </pre> === Description === Get a vast amount of *behind the scene* information on a function. ==== function-name ==== The function name ...") |
(→Example) |
||
Line 33: | Line 33: | ||
// PRINTS | // PRINTS | ||
− | / | + | // PRINTS |
− | Array | + | // Array |
− | ( | + | // ( |
− | [Id] => cat | + | // [Id] => cat |
− | [IdOrig] => cat | + | // [IdOrig] => cat |
− | [ParamCount] => 3 | + | // [ParamCount] => 3 |
− | [Params] => Array | + | // [Params] => Array |
− | ( | + | // ( |
− | [0] => Array | + | // [0] => Array |
− | ( | + | // ( |
− | [Type] => SV | + | // [Type] => SV |
− | [HasObjectId] => false | + | // [HasObjectId] => false |
− | [HasDefault] => true | + | // [HasDefault] => true |
− | [Name] => cat | + | // [Name] => cat |
− | ) | + | // ) |
− | [1] => Array | + | // [1] => Array |
− | ( | + | // ( |
− | [Type] => REF SV | + | // [Type] => REF SV |
− | [HasObjectId] => false | + | // [HasObjectId] => false |
− | [HasDefault] => false | + | // [HasDefault] => false |
− | [Name] => dog | + | // [Name] => dog |
− | ) | + | // ) |
− | [2] => Array | + | // [2] => Array |
− | ( | + | // ( |
− | [Type] => SV | + | // [Type] => SV |
− | [HasObjectId] => false | + | // [HasObjectId] => false |
− | [HasDefault] => false | + | // [HasDefault] => false |
− | [Name] => fox | + | // [Name] => fox |
− | ) | + | // ) |
− | ) | + | // ) |
− | [UseArgVariable] => false | + | // [UseArgVariable] => false |
− | [ReturnType] => 0 | + | // [ReturnType] => 0 |
− | [Scope] => Public | + | // [Scope] => Public |
− | [IsAbstract] => false | + | // [IsAbstract] => false |
− | [IsOverride] => false | + | // [IsOverride] => false |
− | [AddOnce] => false | + | // [AddOnce] => false |
− | [RuleCount] => 0 | + | // [RuleCount] => 0 |
− | [Rules] => Array | + | // [Rules] => Array |
− | ( | + | // ( |
− | ) | + | // ) |
− | + | // ) | |
− | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 09:29, 21 June 2015
FunctionInfo( <function-name> )
Contents |
Description
Get a vast amount of *behind the scene* information on a function.
function-name
The function name to get information on.
Return Value
Success: Returns an array of information.
Failure: Returns null.
Remarks
More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.
Example
// make a function Function cat($cat = "dog", &$dog, $fox) { } // Print information about the function printr FunctionInfo('cat'); // PRINTS // PRINTS // Array // ( // [Id] => cat // [IdOrig] => cat // [ParamCount] => 3 // [Params] => Array // ( // [0] => Array // ( // [Type] => SV // [HasObjectId] => false // [HasDefault] => true // [Name] => cat // ) // [1] => Array // ( // [Type] => REF SV // [HasObjectId] => false // [HasDefault] => false // [Name] => dog // ) // [2] => Array // ( // [Type] => SV // [HasObjectId] => false // [HasDefault] => false // [Name] => fox // ) // ) // [UseArgVariable] => false // [ReturnType] => 0 // [Scope] => Public // [IsAbstract] => false // [IsOverride] => false // [AddOnce] => false // [RuleCount] => 0 // [Rules] => Array // ( // ) // )