本文整理匯總了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);