当前位置: 首页>>代码示例>>PHP>>正文


PHP Router::post方法代码示例

本文整理汇总了PHP中core\Router::post方法的典型用法代码示例。如果您正苦于以下问题:PHP Router::post方法的具体用法?PHP Router::post怎么用?PHP Router::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core\Router的用法示例。


在下文中一共展示了Router::post方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

/**
 * Routes - all standard routes are defined here.
 */
/** Create alias for Router. */
use Core\Router;
use Helpers\Hooks;
/** Define routes. */
Router::any('', 'Controllers\\Home@index');
Router::any('contact', 'Controllers\\Contact@index');
Router::any('portfolio', 'Controllers\\Portfolio@index');
Router::any('painel_contato_usuario', 'Controllers\\PainelContatoUsuario@ListUser');
Router::get('edit_contato_usuario/(:num)', 'Controllers\\PainelContatoUsuario@GetUser');
Router::post('edit_contato_usuario/(:num)', 'Controllers\\PainelContatoUsuario@PostUser');
Router::get('insert-blog', 'Controllers\\PainelContatoUsuario@insert');
Router::get('blog', 'Controllers\\Blog@list');
//Router::any('edit_contato_usuario/(:num)', 'Controllers\PainelContatoUsuario@EditUser');
//Router::any('edit_contato_usuario/(:num)', 'Controllers\PainelContatoUsuario@DeleteUser');
/** Module routes. */
$hooks = Hooks::get();
$hooks->run('routes');
/** If no route found. */
Router::error('Core\\Error@index');
/** Turn on old style routing. */
Router::$fallback = false;
/** Execute matched routes. */
Router::dispatch();
开发者ID:JrzenonDev,项目名称:simple_mvc_framework_landing_page,代码行数:28,代码来源:routes.php

示例2: array

<?php

/**
 * Created by PhpStorm.
 * User: Otas
 * Date: 24. 11. 2015
 * Time: 22:26
 */
require_once '../vendor/autoload.php';
use core\Router;
use core\Request;
Router::get('home/hovno/{id}/{user}', array('home_controller', 'index'));
Router::get('home/users/neco/nevim/{id}/{user}/{gender}', array('user_controller', 'index'));
Router::post('home/{str}/{int}', array('home', 'index'));
Router::printRoutes();
$r = new Request();
Router::Dispatch($r);
?>
<form action="home" method="post">
    <input type="text" name="hovno">
    <input type="text" name="hovdsdno">
    <input type="submit">
</form>
开发者ID:Otas13,项目名称:PHPRouting,代码行数:23,代码来源:index.php

示例3: exit

            error_reporting(0);
            break;
        default:
            exit('The application environment is not set correctly.');
    }
}
//initiate config
new Core\Config();
//create alias for Router
use Core\Router;
use Helpers\Hooks;
//define routes
Router::any('', 'Controllers\\Welcome@index');
Router::any('subpage', 'Controllers\\Welcome@subPage');
Router::get('something/fuck', function () {
    echo 'Fuck you';
});
Router::any('hello', 'Controllers\\Hello@index');
Router::any('login', 'Controllers\\LoginController@login');
Router::any('admin', 'Controllers\\AdminController@index');
Router::any('portal', 'Controllers\\NewPortalController@index');
Router::post('logout', 'Controllers\\LogoutController@logout');
//module routes
$hooks = Hooks::get();
$hooks->run('routes');
//if no route found
Router::error('Core\\Error@index');
//turn on old style routing
Router::$fallback = false;
//execute matched routes
Router::dispatch();
开发者ID:hieunguyenbk,项目名称:AgriExtension,代码行数:31,代码来源:index.php

示例4:

 * Routes - all standard routes are defined here.
 *
 * @author David Carr - dave@daveismyname.com
 * @version 2.2
 * @date updated Sept 19, 2015
 */
/** Create alias for Router. */
use Core\Router;
use Helpers\Hooks;
/** Define routes. */
Router::any('', 'Controllers\\WebController@index');
Router::any('/espectacle/(:num)', 'Controllers\\WebController@detallEspectacle');
Router::any('/entrades/(:num)', 'Controllers\\WebController@formulariCompra');
Router::any('/entrades', 'Controllers\\WebController@formulariCompra');
Router::any('/calendari', 'Controllers\\WebController@calendari');
Router::post('/ajax/planol', 'Controllers\\WebController@ajaxPlanol');
Router::any('/cistella', 'Controllers\\WebController@cistella');
Router::any('/condicions', 'Controllers\\WebController@condicions');
Router::any('/privacitat', 'Controllers\\WebController@privacitat');
Router::any('/ajax/doPagament', 'Controllers\\WebController@doPagament');
Router::any('/entrades/getTPV', 'Controllers\\WebController@getTPV');
Router::any('/entrades/doPagamentResponse', 'Controllers\\WebController@doPagamentResponse');
Router::any('/admin/doPagamentResponse', 'Controllers\\AdminController@doPagamentResponse');
Router::any('/entrades/PrintEntrades', 'Controllers\\WebController@PrintEntrades');
Router::any('/entrades/Validador', 'Controllers\\WebController@Validador');
Router::any('/entrades/ValidadorSave', 'Controllers\\WebController@ValidadorSave');
Router::any('/ajax/getSessionsAvui', 'Controllers\\WebController@getSessionsAvui');
Router::any('/ajax/validaRecaptcha', 'Controllers\\WebController@validaRecaptcha');
Router::any('/ajax/setLocalitat', 'Controllers\\WebController@setLocalitat');
Router::any('/ajax/novaComanda', 'Controllers\\WebController@novaComanda');
Router::any('/ajax/getComanda', 'Controllers\\WebController@getComanda');
开发者ID:nagiro,项目名称:Entrades,代码行数:31,代码来源:routes.php

示例5:

 * @version 2.2
 * @date updated Sept 19, 2015
 */
/** Create alias for Router. */
use Core\Router;
use Helpers\Hooks;
/** Define routes. */
Router::any('', 'Controllers\\Welcome@index');
Router::any('subpage', 'Controllers\\Welcome@subPage');
Router::any('laconnexion', 'Controllers\\Connexion@connexion');
Router::any('connexion', 'Controllers\\Connexion@index');
Router::any('aide', 'Controllers\\Aide@index');
Router::any('tutorial', 'Controllers\\Tutorial@index');
Router::any('equipe', 'Controllers\\Equipe@index');
Router::any('indexScores', 'Controllers\\Scores@index');
Router::any('scores/(:any)', 'Controllers\\Scores@affichageScore');
Router::any('inscription', 'Controllers\\Connexion@indexInscription');
Router::any('linscription', 'Controllers\\Connexion@inscription');
Router::any('ladeconnexion', 'Controllers\\Connexion@deconnexion');
Router::any('indexJouer', 'Controllers\\Play@index');
Router::get('play/(:any)', 'Controllers\\Play@playLevel');
Router::post('play/incrementLevel', 'Controllers\\Connexion@incrementLevel');
/** Module routes. */
$hooks = Hooks::get();
$hooks->run('routes');
/** If no route found. */
Router::error('Core\\Error@index');
/** Turn on old style routing. */
Router::$fallback = false;
/** Execute matched routes. */
Router::dispatch();
开发者ID:jordandevolder,项目名称:Algogoal,代码行数:31,代码来源:routes.php

示例6:

//Создание псевдонимов для роутера
use Core\Router;
//Определение маршрутов
Router::get('', 'Controllers\\Main@index');
Router::get('register', 'Controllers\\User@register');
Router::post('register', 'Controllers\\User@createUser');
Router::get('login', 'Controllers\\User@login');
Router::post('login', 'Controllers\\User@checkUser');
Router::get('login/forgot', 'Controllers\\User@forgot');
Router::post('login/forgot', 'Controllers\\User@sendEmail');
Router::get('user', 'Controllers\\User@login');
Router::get('user/(:num)', 'Controllers\\User@index');
Router::post('user/(:num)', 'Controllers\\User@refresh');
Router::get('user/logout', 'Controllers\\User@logout');
Router::get('user/premium', 'Controllers\\User@premium');
Router::get('files', 'Controllers\\Files@index');
Router::post('files', 'Controllers\\Files@upload');
Router::get('files/(:num)', 'Controllers\\Files@file');
Router::post('files/(:num)', 'Controllers\\Files@addComment');
Router::post('files/appeal', 'Controllers\\Files@sendAppeal');
Router::get('download', 'Controllers\\Files@download');
Router::get('about', 'Controllers\\About@index');
Router::get('privacy', 'Controllers\\Privacy@index');
Router::get('terms', 'Controllers\\Terms@index');
Router::get('faq', 'Controllers\\FAQ@index');
//Если маршрут не найден
Router::error('Core\\Error@index');
//Включить старый роутинг
Router::$fallback = false;
//Запуск найденных маршрутов
Router::dispatch();
开发者ID:Nattpyre,项目名称:rocketfiles,代码行数:31,代码来源:index.php

示例7:

 *
 * @author David Carr - dave@daveismyname.com
 * @version 2.2
 * @date updated Sept 19, 2015
 */
/** Create alias for Router. */
use Core\Router;
use Helpers\Hooks;
/** Define routes. */
Router::any('', 'Controllers\\Index@index');
Router::any('home', 'Controllers\\Home@index');
Router::any('stuff', 'Controllers\\Home@stuff');
Router::any('login', 'Controllers\\User@index');
Router::any('logout', 'Controllers\\User@logout');
Router::post('loginProcess', 'Controllers\\User@login');
Router::any('upanel', 'Controllers\\User@cPanel');
Router::any('task', 'Controllers\\Task@index');
Router::post('addParent', 'Controllers\\Task@addParent');
Router::post('addDate', 'Controllers\\Task@addDate');
Router::post('addChild', 'Controllers\\Task@addChild');
Router::post('markAsComplete', 'Controllers\\Task@markAsComplete');
Router::post('deleteTask', 'Controllers\\Task@deleteTask');
/** Module routes. */
$hooks = Hooks::get();
$hooks->run('routes');
/** If no route found. */
Router::error('Core\\Error@index');
/** Turn on old style routing. */
Router::$fallback = false;
/** Execute matched routes. */
Router::dispatch();
开发者ID:maksym-gryb,项目名称:portfolio,代码行数:31,代码来源:routes.php

示例8:

<?php

use Core\Router;
Router::post('/admin/news/add', 'Controllers\\AdminController@store');
Router::get('/admin/news/add', 'Controllers\\AdminController@create');
Router::get('/admin/news/{newsId}/edit', 'Controllers\\AdminController@edit');
Router::post('/admin/news/{newsId}/delete', 'Controllers\\AdminController@delete');
Router::post('/admin/news/{newsId}/edit', 'Controllers\\AdminController@update');
Router::get('/admin/news', 'Controllers\\AdminController@news');
Router::get('/logout', 'Controllers\\AccountsController@logout');
Router::get('/subscribe', 'Controllers\\AccountsController@subscription');
Router::post('/subscribe', 'Controllers\\AccountsController@subscribe');
Router::get('/login', 'Controllers\\AccountsController@login');
Router::post('/login', 'Controllers\\AccountsController@auth');
Router::post('/{section}/{newsId}', 'Controllers\\NewsController@comment');
Router::get('/{section}/{newsId}', 'Controllers\\NewsController@news');
Router::get('/{section}', 'Controllers\\HomeController@section');
Router::get('/', 'Controllers\\HomeController@home');
开发者ID:albertomoreno,项目名称:web-newspaper,代码行数:18,代码来源:routes.php

示例9:

 * @date updated Sept 19, 2015
 */
/** Create alias for Router. */
use Core\Router;
use Helpers\Hooks;
use Helpers\User;
/** Define routes. */
if (User::current()->isAdmin()) {
    Router::any('', 'Controllers\\Index@index');
} else {
    Router::any('', 'Controllers\\Users@index');
}
Router::post('users', 'Controllers\\Users@create');
Router::get('users', 'Controllers\\Users@index');
Router::post('users/(:num)', 'Controllers\\Users@update');
Router::get('users/(:num)', 'Controllers\\Users@index');
Router::delete('users/(:num)', 'Controllers\\Users@delete');
Router::post('keys', 'Controllers\\Keys@create');
Router::post('keys/(:num)', 'Controllers\\Keys@update');
Router::get('keys/(:num)', 'Controllers\\Keys@index');
Router::delete('keys/(:num)', 'Controllers\\Keys@delete');
Router::get('audit', 'Controllers\\Audit@index');
/** Module routes. */
$hooks = Hooks::get();
$hooks->run('routes');
/** If no route found. */
Router::error('Core\\Error@index');
/** Turn on old style routing. */
Router::$fallback = false;
/** Execute matched routes. */
Router::dispatch();
开发者ID:jnwatts,项目名称:credentials,代码行数:31,代码来源:routes.php


注:本文中的core\Router::post方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。