本文整理汇总了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;
}
示例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