当前位置: 首页>>代码示例>>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;未经允许,请勿转载。