Core Function ClassInfo
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> ClassInfo( <class-name> ) </pre> === Description === Get a vast amount of *behind the scene* information on a class and its functions, properties and so on. ==== class-n...")
(Created page with "<pre> ClassInfo( <class-name> ) </pre> === Description === Get a vast amount of *behind the scene* information on a class and its functions, properties and so on. ==== class-n...")
Latest revision as of 09:32, 21 June 2015
ClassInfo( <class-name> )
Contents |
Description
Get a vast amount of *behind the scene* information on a class and its functions, properties and so on.
class-name
The class 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
// Create a class Class Pay { }; // Extend it Class Tay extends Pay { my $cat { get {} set {} } $dog { get{} } Static Function Moo($hmm = "lol") { } Function hehe($hello) { } }; // Print the information on it printr ClassInfo('Tay'); // PRINTS // Array // ( // [IsDisposed] => false // [Visited] => false // [Id] => 6 // [Base] => Array // ( // [Id] => tay // [IdOrig] => Tay // [HasRule] => false // [IsRule] => false // [InheritedCount] => 1 // [Inherited] => Array // ( // [0] => pay // ) // [FunctionCount] => 1 // [Functions] => Array // ( // [0] => Array // ( // [Id] => hehe // [IdOrig] => hehe // [ParamCount] => 1 // [Params] => Array // ( // [0] => Array // ( // [Type] => SV // [HasObjectId] => false // [HasDefault] => false // [Name] => hello // ) // ) // [UseArgVariable] => false // [ReturnType] => 0 // [Scope] => Public // [IsAbstract] => false // [IsOverride] => false // [AddOnce] => false // [RuleCount] => 0 // [Rules] => Array // ( // ) // ) // ) // [StaticFunctionCount] => 1 // [StaticFunctions] => Array // ( // [0] => Array // ( // [Id] => moo // [IdOrig] => Moo // [ParamCount] => 1 // [Params] => Array // ( // [0] => Array // ( // [Type] => SV // [HasObjectId] => false // [HasDefault] => true // [Name] => hmm // ) // ) // [UseArgVariable] => false // [ReturnType] => 0 // [Scope] => Public // [IsAbstract] => false // [IsOverride] => false // [AddOnce] => false // [RuleCount] => 0 // [Rules] => Array // ( // ) // ) // ) // [OperatorCount] => 0 // [Operators] => Array // ( // ) // [PropertyCount] => 2 // [Properties] => Array // ( // [0] => Array // ( // [Name] => cat // [NameOrig] => cat // [Scope] => Any // [IsAbstract] => false // [Visited] => false // [HasGet] => true // [HasSet] => true // [Get] => Array // ( // [ParamCount] => 1 // [Function] => Array // ( // [Id] => propset // [IdOrig] => PropSet // [ParamCount] => 1 // [Params] => Array // ( // [0] => Array // ( // [Type] => SV // [HasObjectId] => false // [HasDefault] => false // [Name] => value // ) // ) // [UseArgVariable] => false // [ReturnType] => 0 // [Scope] => Public // [IsAbstract] => false // [IsOverride] => false // [AddOnce] => false // [RuleCount] => 0 // [Rules] => Array // ( // ) // ) // ) // ) // [1] => Array // ( // [Name] => dog // [NameOrig] => dog // [Scope] => Any // [IsAbstract] => false // [Visited] => false // [HasGet] => true // [HasSet] => false // [Get] => Array // ( // [ParamCount] => 0 // [Function] => Array // ( // [Id] => propget // [IdOrig] => PropGet // [ParamCount] => 0 // [Params] => Array // ( // ) // [UseArgVariable] => false // [ReturnType] => 0 // [Scope] => Public // [IsAbstract] => false // [IsOverride] => false // [AddOnce] => false // [RuleCount] => 0 // [Rules] => Array // ( // ) // ) // ) // ) // ) // ) // )