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


PHP Routes::get方法代码示例

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


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

示例1: goPage

 public function goPage($page)
 {
     /* テンプレートファイルを取得 */
     $theme = Configure::read('theme');
     $template_path = THEME_DIR . $theme . '/';
     if (!file_exists($template_path . 'Template.php')) {
         $template_path = LIB_DIR;
     }
     $template_class = 'Template';
     if ($template_path == LIB_DIR) {
         $template_class = 'TemplateBase';
     }
     require_once $template_path . $template_class . '.php';
     /* ページを取得し、遷移する */
     $page_routing = Routes::get();
     $template = new $template_class($page_routing[$page]['php']);
     if (isset($page_routing[$page]['js'])) {
         if (is_array($page_routing[$page]['js'])) {
             $template->script_src += $page_routing[$page]['js'];
         } else {
             $template->script_src[] = $page_routing[$page]['js'];
         }
     }
     if (isset($page_routing[$page]['css'])) {
         if (is_array($page_routing[$page]['css'])) {
             $template->style_src += $page_routing[$page]['css'];
         } else {
             $template->style_src[] = $page_routing[$page]['css'];
         }
     }
     $template->render();
 }
开发者ID:nguyennhuanh,项目名称:tjm-mvc,代码行数:32,代码来源:Application.php

示例2: run

 /**
  * Determines the current route and runs it.
  */
 public static function run()
 {
     // Pull the current path out of the get arguments directly
     $length = strlen(APP_RELATIVE_URL) == 0 ? 0 : strlen(APP_RELATIVE_URL) + 1;
     $path = substr(urldecode(parse_url(filter_input(INPUT_SERVER, 'REQUEST_URI'), PHP_URL_PATH)), $length);
     try {
         // Get the appropriate route for the path
         $route = Routes::get($path);
         // If our route is null, we should 404
         if ($route == null) {
             header('Status: 404 Not Found', true, 404);
             View::renderView('404');
             return;
         }
         // See whther or not we have to check the token
         if ($route->isTokenNeeded()) {
             Auth::checkToken();
         }
         // Get the current path variables
         self::$currentPathVariables = self::pullVariables($path, $route);
         // Run the route
         $route->run();
         // See if the last rendered path variable needs to be set
         if (View::hasRenderedView()) {
             Session::set(self::LAST_RENDERED_PATH_KEY, $path);
         }
     } catch (Exception $ex) {
         View::renderJson($ex->getMessage(), false);
         exit;
     }
 }
开发者ID:brandonfrancis,项目名称:scsapi,代码行数:34,代码来源:routing.php

示例3: init

 public static function init()
 {
     // Carrega as variaveis de confiruracao para toda a aplicacao
     Configs::load();
     // Define o modulo
     self::$moduleName = Routes::get('module');
     // Define o controller
     self::setController();
     // Define o metodo
     self::setMethod();
 }
开发者ID:elitonluiz1989,项目名称:modelo,代码行数:11,代码来源:Bootstrap.php

示例4: function

<?php

Routes::get('/', 'demo\\action\\HomeAction@main');
Routes::group(array('prefix' => '/user'), function () {
    Routes::any('/info', 'demo\\action\\HomeAction@info');
});
开发者ID:v3u3i87,项目名称:upadd,代码行数:6,代码来源:routing.php

示例5: ini

            }
        } else {
            if ($ret) {
                return self::$_uri[$keye];
            } else {
                echo self::$_uri[$keye];
            }
        }
    }
    public static function ini()
    {
        include_once "../app/Routes.php";
        Routes::run();
    }
    public static function filter($filter, $call, $falsecall = null)
    {
        //if($filter=="auth") self::$_call_auth=$call;
        //
        self::$_filters[$filter] = $call;
        if (!is_null($falsecall)) {
            self::$_falsecall[$filter] = $falsecall;
        }
    }
    public static function current()
    {
        return self::$current;
    }
}
Routes::get(Config::get('panel.route'), function () {
    Page::put('panel.index');
});
开发者ID:amineabri,项目名称:Fiesta,代码行数:31,代码来源:Routes.php

示例6: post

 public static function post($uri, $callback, $subdomains = null)
 {
     return Routes::get($uri, $callback);
 }
开发者ID:ar-framework-labs,项目名称:kernel,代码行数:4,代码来源:Route.php

示例7: function

<?php

Routes::group('/dash/media', function () {
    /**
     * url: /dash/media/list
     *
     */
    Routes::get(['/list', 'name' => 'media_bundle_list'], 'Media\\Events\\Index@indexAction');
    Routes::get(['/editor', 'name' => 'media_bundle_editor'], 'Media\\Events\\Index@editorAction');
});
Routes::group('/api/v1', function () {
    Routes::post(['/uploaded', 'name' => 'media_upload_v1'], 'Media\\Apis\\V1\\Uploader@uploadAction')->setFormats(['json', 'php']);
});
开发者ID:JanHuang,项目名称:media-bundle,代码行数:13,代码来源:routes.php

示例8:

<?php

Routes::get("/tiga-framework", "WelcomeController@index");
开发者ID:tonjoo,项目名称:tiga,代码行数:3,代码来源:routes.php

示例9: foreach

        //
        if (isset($except)) {
            $i = 0;
            foreach ($all as $value) {
                if (Table::contains($except, $value)) {
                    unset($all[$i]);
                }
                $i++;
            }
        }
        //
        if (isset($only)) {
            foreach ($all as $key => $value) {
                $ext = false;
                foreach ($only as $value2) {
                    if ($value == $value2) {
                        $ext = true;
                        break;
                    }
                }
                if (!$ext) {
                    unset($all[$key]);
                }
            }
        }
        return $all;
    }
}
Routes::get(Config::get('panel.route'), function () {
    include Config::get('panel.folder') . '/home.php';
});
开发者ID:amineabri,项目名称:Fiesta,代码行数:31,代码来源:Routes_2.php

示例10:

	<link href="./css/font-awesome.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="./css/jquery.gritter.css" />
	<link rel="stylesheet" type="text/css" href="./css/style.css">
	<link href="./css/css.min.css" rel="stylesheet">
</head>
<body>
	<section id="container">
		<?php 
include 'left.php';
?>
		<section id="main-content">
		<section class="wrapper">
		<div class="row">
		<div class="col-lg-9 main-chart">
		<?php 
echo Routes::get($r);
?>
	</div>
	<?php 
include 'right.php';
?>
	</div><! --/row -->
	</section>
	</section>
	<?php 
include 'footer.php';
?>
	</section>
	<script src="./js/chart.min.js"></script>
	<!--[if lt IE 9]>
	<script src="./js/html5shiv.min.js"></script>
开发者ID:vinigomescunha,项目名称:Sistema-Baseado-em-Partes-com-MySQL,代码行数:31,代码来源:index.php

示例11: function

<?php

Routes::get("/tiga-framework", function () {
    return Response::content("Welcome to Tiga!");
})->end();
开发者ID:ayubadiputra,项目名称:tiga,代码行数:5,代码来源:routes.php

示例12:

        return <<<WELCOME
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>FastD Module</title>
<style>
    body {
        font-family: 'Source Sans Pro', sans-serif;
        -webkit-font-smoothing: antialiased;
    }
    section {
        text-align: center;
        padding-top: 150px;
    }
    section h1 {
        font-size: 32px;
    }
</style>
</head>
<body>
    <section>
        <h1>Welcome to FastD Module Framework.</h1>
    </section>
</body>
</html>
WELCOME;
    }
}
Routes::get('/', '\\Welcome@welcomeAction');
开发者ID:JanHuang,项目名称:fast.module,代码行数:30,代码来源:routes.php

示例13:

<?php

Routes::get('/login', 'DemoBundle:Events:Index@indexAction');
Routes::get('/welcome', 'DemoBundle:Events:Index@welcomeAction');
开发者ID:JanHuang,项目名称:admin-bundle,代码行数:4,代码来源:routes.php


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