예제 #1
0
파일: Controller.php 프로젝트: cti/direct
 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()) . '
     });';
 }
예제 #2
0
파일: DirectTest.php 프로젝트: cti/direct
 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()));
 }