get_extension
Description:
Returns an instance of some SourceExtension subclass which
registered itself under extension_name
.
If no such instance exists within this, one will be created. It is the caller's responsibility to know which subclass is being returned.
If you just want to test for the existence of an extension within this without creating it, use has_extension.
Extension instances are owned by their Source and should not be referenced directly. Instead, reference the Source instance and use this function to fetch the extension instance as needed.
Parameters:
this |
an Source |
extension_name |
an extension name |
Returns:
an instance of some SourceExtension subclass |