Exemplo n.º 1
0
<?php

/**
 * @author   Anton Shevchuk
 * @created  30.10.12 09:29
 */
namespace Application;

use Application\Users;
use Bluz\Controller\Controller;
use Bluz\Controller\Mapper\Crud;
/**
 * @accept HTML
 * @accept JSON
 * @privilege Management
 *
 * @return array
 */
return function () {
    /**
     * @var Controller $this
     */
    $crud = new Crud();
    $crud->setCrud(Users\Crud::getInstance());
    $crud->get('system', 'crud/get');
    $crud->post('system', 'crud/post');
    $crud->put('system', 'crud/put');
    $crud->delete('system', 'crud/delete');
    return $crud->run();
};
Exemplo n.º 2
0
/**
 * @author   Anton Shevchuk
 * @created  04.09.12 11:21
 */
/**
 * @namespace
 */
namespace Application;

use Application\Roles;
use Bluz\Controller\Controller;
use Bluz\Controller\Mapper\Crud;
/**
 * @accept HTML
 * @accept JSON
 * @privilege Management
 *
 * @return mixed
 */
return function () {
    /**
     * @var Controller $this
     */
    $crud = new Crud();
    $crud->setCrud(Roles\Crud::getInstance());
    $crud->get('system', 'crud/get', 'Read');
    $crud->post('system', 'crud/post', 'Create');
    $crud->put('system', 'crud/put', 'Update');
    $crud->delete('system', 'crud/delete', 'Delete');
    return $crud->run();
};