function get(Direct $direct, Service $service) { header('Content-type: text/javascript'); echo 'Ext.Direct.addProvider({ type: "remoting", url: "' . $direct->getUrl() . '", actions: ' . json_encode($service->getActions()) . ' });'; }
function testServiceArguments() { $service = new Service('Common\\Api', 'Common\\Sys'); $anotherService = new Service(array('Common\\Api', 'Common\\Sys')); $this->assertSame(json_encode($service->getActions()), json_encode($anotherService->getActions())); }