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


PHP Display::render方法代碼示例

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


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

示例1: parse

 public function parse($data, $file, $filters = array(), $content_var = 'the_content')
 {
     $display = new Display((array) $filters);
     $display->meta = $this->meta;
     $display->meta[$content_var] = $data;
     return $display->render('layouts/' . $file);
 }
開發者ID:nanotech,項目名稱:webcore,代碼行數:7,代碼來源:Layout.php

示例2: testRender4

 /**
  * @covers Geissler\CSL\Rendering\Display::render
  */
 public function testRender4()
 {
     $this->initElement('<text variable="note"/>');
     $this->assertEquals('Hello Word', $this->object->render('Hello Word'));
 }
開發者ID:geissler,項目名稱:csl,代碼行數:8,代碼來源:DisplayTest.php

示例3: render

<?php

use Color\Component\Color;
use Color\Component\ColorInterface;
class Display
{
    public function render($value)
    {
        return $value;
    }
}
$color = new Color();
$display = new Display();
echo $color->display('cyan', $display->render('Hello World'));
開發者ID:faizalpribadi,項目名稱:color,代碼行數:14,代碼來源:display.php

示例4: display

/**
 * Rendering Content
 * 
 * This function will be used for subelements, arrays and skip objects in skip elements.
 *
 * @param mixed $content Content to render
 * @param boolean $hide Hiding content
 * @package Skip
 * @since 1.0
 * @return string The content of the element
 * @ignore
 */
function display($content, $hide = FALSE)
{
    $display = new Display();
    return $display->render($content, $hide);
}
開發者ID:antoniorequenalorente,項目名稱:Fanpage-import,代碼行數:17,代碼來源:display.php

示例5: render

 public function render($id = false, $view = false, $display = false)
 {
     global $Display;
     if ($view === false) {
         $view = $this->view;
     }
     if ($display === false) {
         $display = new Display(array('PlainPHP'));
     } elseif (is_array($display)) {
         $filters = $display;
         $display = new Display($filters);
     }
     $display->meta += array('action' => $this->action, 'method' => $this->method, 'id' => $id, 'submit' => $this->submit);
     $display->meta['inputs'] = $this->inputs;
     return $display->render($view);
 }
開發者ID:nanotech,項目名稱:webcore,代碼行數:16,代碼來源:Form.php

示例6: Display

$display = new Display($pages, function ($page, $args, $page_key) use($pages) {
    extract($args, EXTR_SKIP);
    if (file_exists($page->script)) {
        require $page->script;
    } else {
        require $pages["not-found"]->script;
    }
    if (gettype($output) !== 'array') {
        $output = array("message" => $output);
    }
    if (isset($success) && !isset($output['success'])) {
        $output['success'] = $success;
    }
    if (isset($status) && !isset($output['status'])) {
        $output['status'] = $status;
    }
    if (!isset($output['success'])) {
        $output['success'] = TRUE;
    }
    if (!isset($output['status'])) {
        $output['status'] = "200 OK";
        if (!isset($output['success'])) {
            $output['success'] = TRUE;
        }
    }
    // Move status and success to front of output
    $output = array_merge(array("status" => $output['status'], "success" => $output['success']), $output);
    output("json", $output, $output['status']);
});
echo $display->render($route_match['route']['page'], $args);
開發者ID:4534-WiredWizards,項目名稱:ScoutingApp,代碼行數:30,代碼來源:index.php


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