本文整理汇总了PHP中View::content方法的典型用法代码示例。如果您正苦于以下问题:PHP View::content方法的具体用法?PHP View::content怎么用?PHP View::content使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::content方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendConfirmation
public function sendConfirmation($userAttr)
{
$mail = Mail::getInstance();
$mail->setTo($userAttr['email']);
$mail->setFrom();
$mail->setSubject('Your account is created succussful');
$view = new View(HOME . DS . 'views' . DS . 'confirm.tpl');
$view->set('user', $userAttr);
$view->set('url', APP_URL . '/activate.php?token=' . $userAttr['confirmation_code']);
$mail->setTemplate($view->content());
return $mail->send();
}
示例2: render2
public static function render2($cntrllr, $view, $data = [])
{
// Module::$module;
self::$content = "";
if (!isset($_GET['view'])) {
self::$content = "app/views/" . $view . "-view.php";
} else {
if (View::isValid()) {
self::$content = "app/views/" . $view . "/widget-default.php";
} else {
View::Error("<b>404 NOT FOUND</b> View <b>" . $view . "</b> folder !!");
}
}
if ($cntrllr->default_layout != "") {
include "app/layouts/layout.php";
}
}
示例3: date
<head>
<title><?php
echo APPNAME;
?>
</title>
<link href="/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href="/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="/assets/css/style.css" rel="stylesheet" />
<?php
View::stylesheets();
?>
</head>
<body>
<div class="container" id="main-content">
<?php
View::content();
?>
</div>
<footer class="text-center" id="footer">
<hr />
<small class="text-muted">Copyright © <?php
echo date('Y');
?>
. All Rights Reserved.</small>
</footer>
<script type="text/javascript" src="/assets/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/assets/bootstrap/js/bootstrap.min.js"></script>
<?php
View::javascripts();
示例4: Config
<?php
/**
* File: index.php
* User: zacharydubois
* Date: 2016-01-04
* Time: 20:47
* Project: Digital-Footprint-Profile
*/
namespace dfp;
// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav (Index is empty).
$nav->setActive('');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('index');
$view->content(array('title' => 'Welcome | Digital Footprint Profile', 'sessionLink' => Utility::buildFullLink($config, true, 'session')));
echo $view->render();
示例5: view_yield
function view_yield()
{
return View::content();
}
示例6: content
/**
* Envia la salida en buffer al navegador
*
*/
function content()
{
View::content();
}
示例7: Config
<?php
/**
* File: about.php
* User: zacharydubois
* Date: 2016-01-04
* Time: 20:47
* Project: Digital-Footprint-Profile
*/
namespace dfp;
// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('about');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('about');
$view->content(array('title' => 'About | Digital Footprint Profile'));
echo $view->render();
示例8: array
function draw_main($content)
{
self::$content = $content;
$attributes = array("id" => HTML_CONTENT, "class" => HTML_CONTENT_CLASS);
$main_start = BuildHTML::start_element(self::$div, $attributes);
$main_end = BuildHTML::end_element(self::$div);
echo $main_start;
echo self::$content;
echo $main_end;
}
示例9: setContent
/**
*
* @param string $content
* @author Nanhe Kumar <nanhe.kumar@gmail.com>
*/
public static function setContent($content)
{
self::$content = $content;
}
示例10: Session
// Session
$session = new Session($config);
if ($session->getTMP('allowNext') !== true) {
header('Location: ' . Utility::buildFullLink($config, false, 'session'));
} else {
// View
$nav = new Nav($config);
$nav->setActive('list');
$view = new View($config);
$view->tpl('list');
$view->navArray($nav->navArray(true));
// Parse
$parse = new Parse();
// List array
$list = array();
$total = 0;
$flagged = 0;
foreach ($session->get('posts') as $post) {
$content = preg_replace('/(\\n)/', ' ', $post['content']);
$parse->parse($content);
$score = $parse->score();
$tags = $parse->tags();
if ($score >= 3) {
$list[] = array('url' => $post['url'], 'score' => $score, 'tags' => $tags, 'content' => $content);
$flagged++;
}
$total++;
}
$view->content(array('title' => 'Your Posts | Digital Footprint Profile', 'posts' => $list, 'total' => $total, 'flagged' => $flagged));
echo $view->render();
}
示例11: editardoc
public function editardoc()
{
View::content('editardoc');
}
示例12: Config
<?php
/**
* File: terms.php
* User: zacharydubois
* Date: 2016-01-04
* Time: 20:47
* Project: Digital-Footprint-Profile
*/
namespace dfp;
// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('terms');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('terms');
$view->content(array('title' => 'Terms | Digital Footprint Profile'));
echo $view->render();
示例13: Config
<?php
/**
* File: privacy.php
* User: zacharydubois
* Date: 2016-01-04
* Time: 20:48
* Project: Digital-Footprint-Profile
*/
namespace dfp;
// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('privacy');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('privacy');
$view->content(array('title' => 'Privacy | Digital Footprint Profile'));
echo $view->render();
示例14: Config
*/
namespace dfp;
// Create config
$config = new Config();
// Create session instance.
$session = new Session($config);
// Create Nav
$nav = new Nav($config);
$nav->setActive('session');
// Create view.
$view = new View($config);
$view->navArray($nav->navArray(true));
$view->tpl('session');
// Twitter
if ($session->getTMP('twitter_name') === false) {
$twitter = new Twitter($config, $session);
$twitterButton = array('url' => $twitter->authorizeURL(), 'text' => 'Login with Twitter', 'classes' => '');
} else {
$twitterButton = array('url' => '#', 'text' => 'Twitter: @' . $session->getTMP('twitter_name'), 'classes' => 'disabled');
}
// Facebook
if ($session->getTMP('facebook_name') === false) {
$facebook = new Facebook($config, $session);
$facebookButton = array('url' => $facebook->authorizeURL(), 'text' => 'Login with Facebook', 'classes' => '');
} else {
$facebookButton = array('url' => '#', 'text' => 'Facebook: ' . $session->getTMP('facebook_name'), 'classes' => 'disabled');
}
// Render and return
$view->content(array('title' => 'Start | Digital Footprint Profile', 'listURL' => Utility::buildFullLink($config, false, 'session/list'), 'loginButtons' => array($twitterButton, $facebookButton)));
echo $view->render();