Exemple #1
0
<?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();
};
Exemple #2
0
<?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();
};
Exemple #3
0
<?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();
};
Exemple #4
0
<?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();
};
Exemple #5
0
 /**
  * Process Rest
  *
  * @return mixed
  */
 protected function processRest()
 {
     $restController = new Controller\Rest();
     $restController->setCrud(Crud::getInstance());
     return $restController();
 }
Exemple #6
0
<?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();
};
Exemple #7
0
 *      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();
};