<?php /** * Example of REST controllers for OPTIONS method * * @category Application * * @author Anton Shevchuk * @created 19.02.15 16:46 */ namespace Application; use Application\Test; use Bluz\Controller; return function () { $restController = new Controller\Rest(); $restController->setCrud(Test\Crud::getInstance()); return $restController->methodOptions(); };
<?php /** * Public REST for pages * * @author Anton Shevchuk * @created 30.10.12 09:29 */ namespace Application; use Application\Pages; use Bluz\Controller; return function () { /** * @var Bootstrap $this */ $crudController = new Controller\Rest(); $crudController->setCrud(Pages\Crud::getInstance()); return $crudController(); };
<?php /** * Example of REST controllers for DELETE method * * @category Application * * @author Anton Shevchuk * @created 19.02.15 16:46 */ namespace Application; use Application\Test; use Bluz\Controller; return function () { $restController = new Controller\Rest(); $restController->setCrud(Test\Crud::getInstance()); return $restController->methodDelete(); };
<?php /** * Example of REST controllers * * @category Application * * @author Anton Shevchuk * @created 12.08.13 17:23 */ namespace Application; use Application\Test; use Bluz\Controller; return function () { $restController = new Controller\Rest(); $restController->setCrud(Test\Crud::getInstance()); return $restController(); };
/** * Process Rest * * @return mixed */ protected function processRest() { $restController = new Controller\Rest(); $restController->setCrud(Crud::getInstance()); return $restController(); }
<?php /** * Created by PhpStorm. * User: gunko * Date: 10/5/15 * Time: 1:57 PM */ namespace Application; use Bluz\Controller; use Application\Musician; /** * @accept JSON * @accept XML * @privilege Management * @accept JSONP * @return mixed */ return function () { $restController = new Controller\Rest(); $restController->setCrud(Musician\Crud::getInstance()); return $restController(); };
* method="DELETE", nickname="deleteItem", * summary="Delete Item", * @SWG\Parameter( * name="id", * description="ID of item dish needs to be removed", * paramType="path", * required=true, * allowMultiple=false, * type="integer" * ), * @SWG\ResponseMessage(code=204, message="Dish removed"), * @SWG\ResponseMessage(code=404, message="Dish not found") * ) * ) * * * * */ /** * @accept HTML * @accept JSON * @accept XML * @privilege Management * @return mixed */ return function () { $restController = new Controller\Rest(); $restController->setCrud(Menu\Crud::getInstance()); return $restController(); };