Introduce Foreign Method
From CSSEMediaWiki
Revision as of 20:46, 14 October 2009 by Brett Ward (Talk | contribs)
Sometimes you'll have some brilliant class that is missing a feature or method, but cannot alter the source code. Instead, the lack of method must be coded around.
To do this, you add the method in the client class that would like the functionality from the server class you cannot alter. The method should not access anything in the client class, and send values in as parameters if needed. The first parameter should be the server class.
If it becomes the case that a server class needs several foreign methods, or many classes are using the same foreign method, Introduce Local Extension should be used instead.
See Also