On the same server I have a Restler 3.0 API server and also a CakePHP 2.3 application, I want to be able to use CakePHP controller functions from the Restler app. Of course I don't want CakePHP to do any rendering, just to deal with the data.
I considered just doing a https request to the CakePHP app from the Restler api, but this seemed pretty inefficient for the client of the Restler server. I also considered using RabbitMQ to do RPC between the apps but RPC in PHP seemed like too much complexity for something i'm trying to keep simple.
Ideally in Restler i might have something like this:
<?php
class Content {
function post() {
// CakePHP stuff:
$data = array('title'=>'fake data');
$this->Content->create();
if ($this->Content->save($data)) {
return 'ok';
}
}
}
I'm completely open to any good ideas on the best way to achieve this integration.