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