本文整理汇总了PHP中view::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP view::getView方法的具体用法?PHP view::getView怎么用?PHP view::getView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类view
的用法示例。
在下文中一共展示了view::getView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFacadeAccessor
protected static function getFacadeAccessor()
{
if (!static::$__theme) {
static::$__theme = new theme_theme(view::getView());
}
return static::$__theme;
}
示例2: view
<?php
//home controller
include 'models/view.php';
// views model
$viewmodel = new view();
// / index if not action
if (empty($_GET["action"])) {
$viewmodel->getView("views/header.php");
$viewmodel->getView("views/form.php");
} else {
// home action
if ($_GET["action"] == "home") {
//the action is what the user clicks to navigate through site
$viewmodel->getView("views/header.php");
$viewmodel->getView("views/form.php");
// process Form
} elseif ($_GET["action"] == "inJSON") {
// grabs user's input
$search = $_POST["search"];
// api call
$data = file_get_contents("https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=2b345e3e9550c3047952ba28d7147738&text=" . $search . "&format=json&nojsoncallback=1");
// format the data
$jsonarr = json_decode($data, true);
//var_dump($jsonarr);
//echo json_encode($jsonarr);
//var_dump($jsonarr);
// Template using views models
$viewmodel->getView("views/header.php");
// Sends data to the Dom
$viewmodel->getView("views/image.php", $jsonarr);