We need to create a layer of abstraction in the existing SearchEntities API module to do things the old way or the new [not yet implemented way (can throw an exception)] based on the type query parameter.
We need an "if" statement to see whether remote properties are used and if the type being requested is a property
- IF no then use the existing logic (but probably factored out into a different class with a standard interface)
- If yes then call a second implementation of this new thing (can just throw an exception for now) as it will be implemented in T246803: Implement new way of abstraction to call remote wbsearchentities API
The SearchEntities API class will end up being fairly empty only calling out to other classes and doing the mediawiki specific stuff.
We will likely want to keep using a pattern similar to this as we turn on federated properties for more API modules and might want to think about a common abstraction here.
One thing to note as discussed in our in person meeting is that either here or as part of T246803 we will likely have to loosen the requirement / mediawiki validation of the languages parameter on initial API input.