當前位置: 首頁>>代碼示例>>PHP>>正文


PHP runner::return_route方法代碼示例

本文整理匯總了PHP中runner::return_route方法的典型用法代碼示例。如果您正苦於以下問題:PHP runner::return_route方法的具體用法?PHP runner::return_route怎麽用?PHP runner::return_route使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在runner的用法示例。


在下文中一共展示了runner::return_route方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mailer

 public static function mailer($route, $context = array(), $attachment = null)
 {
     $return = false;
     $mail = \runner::return_route($route, $context, $router);
     $address = isset($router->runner->context['address']) ? $router->runner->context['address'] : false;
     $header = isset($router->runner->context['header']) ? $router->runner->context['header'] : array();
     if ($address || isset($header['AddAddress']) && is_array($header['AddAddress'])) {
         $return = self::sender($address, $header, $mail, $attachment);
     }
     return $return;
 }
開發者ID:RetroscopeCreative,項目名稱:RouterunnerCMS,代碼行數:11,代碼來源:Mail.php

示例2: FROM

<!-- Page Content -->
<div class="rr-content-container">

<?php 
$resource_uri = \bootstrap::get("resource_url");
$current = \bootstrap::get("current");
$content_header = \runner::return_route("content_header");
$resource = \bootstrap::get("resource");
if (isset($resource[0], $resource[1]) && $resource[0] == "category") {
    $SQL = <<<SQL
SELECT models.reference, found_data.type, found_data.id, found_data.sort_order, found_data.date FROM (
SELECT 'product' AS type, oc_product.product_id AS id, oc_product.sort_order, oc_product.date_added AS date FROM oc_product
LEFT JOIN oc_product_to_category ON oc_product_to_category.product_id = oc_product.product_id
LEFT JOIN oc_category ON oc_category.category_id = oc_product_to_category.category_id
LEFT JOIN oc_url_alias ON oc_url_alias.query = CONCAT('category_id=', oc_category.category_id)
WHERE oc_url_alias.keyword = :category
) AS found_data
LEFT JOIN `{PREFIX}models` AS models ON models.model_class = found_data.type AND models.table_id = found_data.id
ORDER BY found_data.sort_order, found_data.date DESC, found_data.id DESC

SQL;
    $params = array(':category' => $resource[1]);
    if ($result = \db::query($SQL, $params)) {
        foreach ($result as $row) {
            $contents[$row["reference"]] = array($row["id"] => $row["type"]);
        }
    }
} elseif (isset($_GET["search"])) {
    $SQL = <<<SQL
SELECT models.reference, found_data.type, found_data.id, found_data.date FROM (
SELECT 'post' AS type, post.id, post.date FROM post
開發者ID:RetroscopeCreative,項目名稱:RouterunnerDemo,代碼行數:31,代碼來源:contents.view.php


注:本文中的runner::return_route方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。