I am writing a simple JsonAPI server, and I've written a basic controller that can handle most objects. For each model I have, I extend this controller with a new class that contains essentially this:
class NewChild extends BasicController {
public function __construct() {
parent::__construct("NewChild");
}
}
Then, I create all REST routes for this controller (the actual methods being defined in the BasicController).
Since it is a bit redundant to write this for each model, I was thinking I could write an anonymous class, automatically, for each model I have, and then pass this class to the routes. However, I don't think this is possible right now in F3. right? Does anyone know how I could do such a thing?