In Moodle 2.2 a change was made to the context API with a new object-orientated mechanism for retrieving contexts. It is described in Development:Access_API and it shouldn't be too much of a shock to the system vs the old API functions (which are still available).
Its probably fair to say we didn't communicate this new API amazingly well, hence my post here to draw more developers' attention to it. Starting from Moodle 2.4, most uses of the old API will have been converted to the new style in Moodle core.
If you have any questions about this new style, please post them here (though i'm just being a messenger, so may not be able to answer you internals questions