本文整理汇总了PHP中MyView类的典型用法代码示例。如果您正苦于以下问题:PHP MyView类的具体用法?PHP MyView怎么用?PHP MyView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MyView类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show
function show()
{
$myModel = new MyModel();
$data = $myModel->get();
$myView = new MyView();
$myView->display($data);
}
开发者ID:saoraozhe3hao,项目名称:phpDemo,代码行数:7,代码来源:MyCtrl.class.php
示例2: initializeView
protected function initializeView()
{
if (self::$shouldCallParentAndEcho) {
parent::initializeView();
echo 'View' . PHP_EOL;
}
if (is_null($this->view)) {
$this->view = MyView::getInstance();
}
}
开发者ID:quickshiftin,项目名称:PureMVC-ext,代码行数:10,代码来源:MyFacade.php
示例3: initializeController
public function initializeController()
{
if (self::$amWacky) {
parent::initializeController();
var_dump($this->view);
var_dump($this->commandMap);
} elseif (self::$shouldUseMyView) {
$this->view = MyView::getInstance();
}
}
开发者ID:quickshiftin,项目名称:PureMVC-ext,代码行数:10,代码来源:MyController.php
示例4: MyView
<?php
include "../../config/settings.inc.php";
include "../../include/database.inc.php";
include "setup.php";
include "../../include/myview.php";
$t = new MyView();
$t->thispage = "iem-sites";
$t->title = "Current Data";
$t->sites_current = "current";
if (strpos($network, "_DCP") || strpos($network, "_COOP")) {
$table = '<p>This station reports observations in SHEF format. The following
is a table of the most recent reports from this site identifier for
each reported SHEF variable';
$mesosite = iemdb('mesosite');
$shefcodes = array();
$rs = pg_query($mesosite, "SELECT * from shef_physical_codes");
for ($i = 0; $row = @pg_fetch_assoc($rs, $i); $i++) {
$shefcodes[$row['code']] = $row['name'];
}
$durationcodes = array();
$rs = pg_query($mesosite, "SELECT * from shef_duration_codes");
for ($i = 0; $row = @pg_fetch_assoc($rs, $i); $i++) {
$durationcodes[$row['code']] = $row['name'];
}
$extremumcodes = array();
$rs = pg_query($mesosite, "SELECT * from shef_extremum_codes");
for ($i = 0; $row = @pg_fetch_assoc($rs, $i); $i++) {
$extremumcodes[$row['code']] = $row['name'];
}
$pgconn = iemdb('access');
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:current.php
示例5: str_pad
}
for ($i = 0; $row = @pg_fetch_array($result, $i); $i++) {
$table .= str_pad($row["id"], 9) . str_pad($row["synop"], 7) . str_pad($row["name"], 33) . str_pad($row["state"], 3) . str_pad($row["country"], 2) . sprintf("%6.0f", $row["latitude"] * 100) . sprintf("%7.0f", $row["longitude"] * 100) . sprintf("%6.0f", $row["elevation"]) . "\n";
}
if (!$nohtml) {
$table .= "</pre>\n";
}
}
}
}
}
}
}
}
if (!$nohtml || $format == 'shapefile') {
$t = new MyView();
$t->title = "Network Station Tables";
$t->thispage = "iem-networks";
$page = 'single.phtml';
$sextra = "";
if (isset($_REQUEST['station'])) {
$t->sites_current = "tables";
include "setup.php";
$page = 'sites.phtml';
$sextra = sprintf("<input type=\"hidden\" value=\"%s\" name=\"station\">", $_REQUEST["station"]);
}
$ar = array("html" => "HTML Table", "csv" => "Comma Delimited", "shapefile" => "ESRI Shapefile", "gempak" => "GEMPAK Station Table", "awips" => "AWIPS Station Table", "madis" => "MADIS Station Table");
$fselect = make_select("format", $format, $ar);
$nselect = selectNetwork($network, array("_ALL_" => "All Networks"));
$t->content = <<<EOF
<h3>Network Location Tables</h3>
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:networks.php
示例6: define
<?php
/*
* This is an Extjs application that allows historical and current viewing of
* webcam images.
*/
include "../../config/settings.inc.php";
define("IEM_APPID", 9);
require_once "../../include/myview.php";
$t = new MyView();
include "../../include/iemprop.php";
$camera_refresh = get_iemprop("webcam.interval");
$t->headextra = <<<EOF
<link rel="stylesheet" type="text/css" href="https://extjs.cachefly.net/ext/gpl/5.0.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"/>
<script type="text/javascript" src="https://extjs.cachefly.net/ext/gpl/5.0.0/build/ext-all.js"></script>
<script>
Ext.namespace('cfg');
cfg.refreshint = {$camera_refresh}000;
cfg.header = 'iem-header';
cfg.headerHeight = 60;
cfg.jsonSource = '/json/webcams.php';
</script>
<script type='text/javascript' src='webcam-static.js?v=7'></script>
<style>
.webimage {
height: 240px;
width : 320px;
}
.thumb-wrap{
float: left;
margin: 1px;
开发者ID:bthoover,项目名称:iem,代码行数:31,代码来源:webcam.php
示例7: cached
function cached($path)
{
if (Configure::read('Cache.enable') && Configure::read('Cache.view')) {
$path = Inflector::slug($path);
$filename = CACHE . 'views' . DS . $path . '.php';
if (!file_exists($filename)) {
$filename = CACHE . 'views' . DS . $path . '_index.php';
}
if (file_exists($filename)) {
if (!class_exists('MyView')) {
App::import('Core', 'View', $this->app);
}
$view = new MyView($this, false);
$view->ajaxRequest = $this->ajaxRequest;
$view->viewSuffix = $this->viewSuffix;
$view->name = $this->name;
// $view->helpers = $this->helpers;
// $view->layout = $this->layout;
return $view->renderCache($filename, S2getMicrotime());
}
}
return false;
}
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:23,代码来源:controller.php
示例8: MyModel
<?php
/*include_once("myconfig.php");*/
include '.././classes/mymodel.php';
include '.././classes/myview.php';
/*CONTROLLER CREATES THE MODEL*/
$theActualModel = new MyModel();
/*TEST IT IS INSTANCIATED*/
$myTemp = $theActualModel->getQueryValue();
echo $myTemp;
echo "<p></p>";
/*CONTROLLER FINDS OUT THE QUERY STRING APPENDED TO THE URL, REVERSES IT, AND SENDS IT TO THE MODEL*/
/*... BUT MAYBE IT WOULD BE BETTER FOR THE MANIPULATION TO OCCUR INSIDE THE MODEL?*/
$theURLStuff = strrev($_SERVER['QUERY_STRING']);
$theActualModel->setQueryValue($theURLStuff);
/*CONTROLLER CREATES THE VIEW*/
$theActualView = new MyView();
/*TEST THE VIEW WORKS*/
$myTempViewModelText = $theActualView->displayTheInfo();
/*echo $myTempViewModelText ; */
echo "<p>Here is the number at the end of the URL, but reversed.</p>";
/*CONTROLLER GETS TEXT FROM THE MODEL AND SENDS TO THE VIEW*/
$theActualView->setInfoToDisplay($theActualModel->getQueryValue());
/*CONTROLLER TELLS VIEW TO DISPLAY THE TEXT*/
$theActualView->displayTheInfo();
开发者ID:BenAnderson2014,项目名称:dating-site,代码行数:25,代码来源:index.php
示例9: define
<?php
include_once "../../config/settings.inc.php";
define("IEM_APPID", 86);
include_once "../../include/myview.php";
$t = new MyView();
$t->title = "7 AM 24 Hour Precipitation Analysis";
$t->headextra = <<<EOF
<link rel="stylesheet" href="/vendor/openlayers/3.6.0/ol.css" type="text/css">
<link rel="stylesheet" href="/assets/jquery-ui/1.11.2/jquery-ui.min.css" />
<link type="text/css" href="/vendor/openlayers/3.6.0/ol3-layerswitcher.css" rel="stylesheet" />
<style>
.map {
height: 400px;
width: 100%;
background-color: #FFFFFF;
}
.popover {
width: 300px;
}
</style>
EOF;
$t->jsextra = <<<EOF
<script src="/vendor/openlayers/3.6.0/ol.js" type="text/javascript"></script>
<script src="/assets/jquery-ui/1.11.2/jquery-ui.js"></script>
<script src='/vendor/openlayers/3.6.0/ol3-layerswitcher.js'></script>
<script src='7am-app.js?v=8'></script>
EOF;
$t->content = <<<EOF
<ol class="breadcrumb">
\t<li><a href="/COOP/">NWS COOP</a></li>
开发者ID:raprasad,项目名称:iem,代码行数:31,代码来源:7am.php
示例10: MyView
<?php
include "../../config/settings.inc.php";
include "../../include/myview.php";
$t = new MyView();
define("IEM_APPID", 40);
$sortcol = isset($_GET["sortcol"]) ? $_GET["sortcol"] : "peak";
$metar = isset($_GET["metar"]) ? $_GET['metar'] : "no";
$sorder = isset($_GET["sorder"]) ? $_GET["sorder"] : "desc";
$wfo = isset($_REQUEST["wfo"]) ? $_REQUEST["wfo"] : 'DMX';
$t->refresh = "<meta http-equiv=\"refresh\" content=\"60;\">";
$t->title = "Obs by NWS Forecast Office";
$t->thispage = "current-sort";
include "../../include/mlib.php";
include "../../include/network.php";
$nt = new NetworkTable("WFO");
include "../../include/forms.php";
include "../../include/station.php";
include "../../include/iemaccess.php";
include "../../include/iemaccessob.php";
$iem = new IEMAccess();
$asos = $iem->getWFO($wfo);
$vals = array("tmpf" => "Air Temperature [F]", "dwpf" => "Dew Point Temp [F]", "sknt" => "Wind Speed [knots]", "drct" => "Wind Direction [deg]", "alti" => "Altimeter [mb]", "peak" => "Today's Wind Gust [knots]", "peak_ts" => "Time of Peak Gust", "relh" => "Relative Humidity", "feel" => "Feels Like [F]", "vsby" => "Visibility [miles]", "ts" => "Observation Time", "phour" => "Last Hour Rainfall [inch]", "min_tmpf" => "Today's Low Temperature", "max_tmpf" => "Today's High Temperature", "pday" => "Today Rainfall [inch]");
$t->current_network = "By NWS WFO";
$wselect = "<select name=\"wfo\">";
while (list($key, $value) = each($nt->table)) {
$wselect .= "<option value=\"{$key}\" ";
if ($wfo == $key) {
$wselect .= "SELECTED";
}
$wselect .= ">[" . $key . "] " . $nt->table[$key]["name"] . "\n";
开发者ID:raprasad,项目名称:iem,代码行数:31,代码来源:obs.php
示例11: renderLayout
function renderLayout($content_for_layout, $layout = null)
{
$layout_fn = $this->_getLayoutFileName($layout);
$data_for_layout = array_merge($this->viewVars, array('content_for_layout' => $content_for_layout));
if (empty($this->loaded) && !empty($this->helpers)) {
$loadHelpers = true;
} else {
$loadHelpers = false;
$data_for_layout = array_merge($data_for_layout, $this->loaded);
}
if (substr($layout_fn, -3) === 'ctp' || substr($layout_fn, -5) === 'thtml') {
$this->output = MyView::_render($layout_fn, $data_for_layout, $loadHelpers, true);
} else {
$this->output = $this->_render($layout_fn, $data_for_layout, $loadHelpers);
}
// $out = $this->_render($layout_fn, $data_for_layout, $loadHelpers);
if ($this->output === false) {
$this->output = $this->_render($layout_fn, $data_for_layout);
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layout_fn, $this->output), E_USER_ERROR);
return false;
}
/* if (!empty($this->loaded)) {
$helpers = array_keys($this->loaded);
foreach ($helpers as $helperName) {
$helper =& $this->loaded[$helperName];
if (is_object($helper)) {
if (is_subclass_of($helper, 'Helper') || is_subclass_of($helper, 'helper')) {
$helper->afterLayout();
}
}
}
} */
return $this->output;
}
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:34,代码来源:view.php
示例12: cached
/**
* Outputs cached dispatch view cache
*
* @param string $url Requested URL
* @access public
*/
function cached($url)
{
App::import('Component', 'config', $this->app);
$controller = new stdClass();
if (class_exists('ConfigComponent')) {
$Config = new ConfigComponent();
$Config->startup($controller);
}
$User = cmsFramework::getUser();
if ($User->id === 0 && !Configure::read('Cache.disable') && Configure::read('Cache.view') && !defined('MVC_FRAMEWORK_ADMIN')) {
$path = $this->here;
if ($this->here == '/') {
$path = 'home';
}
$path = Inflector::slug($path);
$filename = CACHE . 'views' . DS . $path . '.php';
if (!file_exists($filename)) {
$filename = CACHE . 'views' . DS . $path . '_index.php';
}
if (file_exists($filename)) {
if (!class_exists('MyView')) {
App::import('Core', 'View', $this->app);
}
$controller = null;
$view = new MyView($controller, false);
// Pass the configuration object to the view and set the theme variable for helpers
$view->name = $this->controller;
$view->action = $this->action;
$view->page = Sanitize::getInt($this->params, 'page');
$view->limit = Sanitize::getInt($this->params, 'limit');
$view->Config = $Config;
$view->viewTheme = $Config->template;
$view->xajaxRequest = false;
$view->ajaxRequest = $this->isAjax();
$out = $view->renderCache($filename, S2getMicrotime());
return $out;
}
}
return false;
}
开发者ID:bizanto,项目名称:Hooked,代码行数:46,代码来源:dispatcher.php
示例13: define
<?php
include "../../../config/settings.inc.php";
include "../../../include/myview.php";
include "../../../include/forms.php";
include "../../../include/imagemaps.php";
define("IEM_APPID", 109);
$t = new MyView();
$t->thispage = "gis-";
$t->jsextra = <<<EOF
<script>
\$('select[name=station]').change( function() {
\tnexrad = \$('select[name=station]').val();
\t\$('#histimage').attr('src', '/pickup/nexrad_attrs/'+nexrad+'_histogram.png');
\twindow.location.href = "#"+ nexrad;
});
var tokens = window.location.href.split('#');
if (tokens.length == 2 && tokens[1].length == 3){
\t\$('#histimage').attr('src', '/pickup/nexrad_attrs/'+ tokens[1] +'_histogram.png');
}
</script>
EOF;
$t->title = "Download NEXRAD Storm Attributes Shapefile";
$content = <<<EOF
<h3 class="heading">Archived NEXRAD Storm Attributes Shapefiles</h3>
<p>The IEM attempts to process and archive the Storm Attribute Table that is
produced by the RADARs that are a part of the NEXRAD network. This page allows
you to selectively download these attributes from the IEM database in
shapefile format. <strong>Holes do exist in this archive!</strong> If you find
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:nexrad_storm_attrs.php
示例14: MyView
<?php
include_once "../../../../config/settings.inc.php";
include_once "../../../../include/myview.php";
$OL = "3.9.0";
$t = new MyView();
$t->title = "Profitability Map";
$t->headextra = <<<EOF
<link rel="stylesheet" href="/vendor/openlayers/{$OL}/ol.css" type="text/css">
<link rel="stylesheet" href="/vendor/jquery-ui/1.11.4/jquery-ui.min.css" />
<link type="text/css" href="/vendor/openlayers/{$OL}/ol3-layerswitcher.css" rel="stylesheet" />
EOF;
$t->jsextra = <<<EOF
<script src="/vendor/openlayers/{$OL}/ol.js" type="text/javascript"></script>
<script src="/vendor/jquery-ui/1.11.4/jquery-ui.js"></script>
<script src='/vendor/openlayers/{$OL}/ol3-layerswitcher.js'></script>
<script>
var map;
var player;
\$(document).ready(function(){
\tplayer = new ol.layer.Tile({
title: 'Profitability',
\t\t\t\t\t\tvisible: true,
source: new ol.source.XYZ({
url : '/c/tile.py/1.0.0/profit2010/{z}/{x}/{y}.png'
})
});
\t\t
\t\tmap = new ol.Map({
target: 'map',
layers: [new ol.layer.Tile({
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:index.php
示例15: __construct
public function __construct($template, $engine, $vars)
{
parent::__construct($template, $engine, $vars);
$vars['page'] = 'home';
$vars['title'] = $vars['site_name'] . ' Home';
$this->addVars($vars);
}
开发者ID:cohesion,项目名称:cohesion-framework,代码行数:7,代码来源:HomeView.php
示例16: showName
public static function showName()
{
self::$showName = true;
}
开发者ID:quickshiftin,项目名称:PureMVC-ext,代码行数:4,代码来源:MyView.php
示例17: set_base_href
public static function set_base_href($base_href)
{
self::$base_href = $base_href;
}
开发者ID:DerBunman,项目名称:bun-fw,代码行数:4,代码来源:view.php
注:本文中的MyView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论