本文整理汇总了PHP中Layout::getLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::getLayout方法的具体用法?PHP Layout::getLayout怎么用?PHP Layout::getLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::getLayout方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public static function render($partial, $data = array())
{
$path = self::PARTIAL_BASE . Layout::getLayout() . '/';
if (!file_exists(dirname(dirname(__FILE__)) . View::VIEW_PATH . Layout::getLayout() . '/' . $path . $partial . View::VIEW_EXT)) {
$path = self::PARTIAL_BASE . 'main/';
}
$partial = new View($path . $partial, $data);
return $partial->render();
}
示例2: info
public function info($arguments)
{
if (empty($arguments[0])) {
return $this->setView('nil');
}
$top = dirname(dirname(__FILE__)) . '/views/';
$place = '/pages/info/' . basename($arguments[0]) . '.php';
if (!file_exists($top . Layout::getLayout() . $place) && !file_exists($top . 'main' . $place)) {
return $this->nil();
}
$this->setView('pages/info/' . basename($arguments[0]));
}
示例3: __construct
public function __construct($viewPath, $data = array(), $driver = self::DRIVER_TRADITIONAL)
{
$this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . Layout::getLayout() . '/' . $viewPath . self::VIEW_EXT;
if (!file_exists($this->viewPath)) {
$this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . 'main/' . $viewPath . self::VIEW_EXT;
}
$this->driver = self::DRIVER_PREFIX . $driver . self::VIEW_SUFFIX;
if (!class_exists($this->driver)) {
die('Invalid driver.');
}
$this->data = $data;
}
示例4: __construct
public function __construct($viewPath, $data = array(), $driver = self::DRIVER_TRADITIONAL)
{
// hard code the layout for now, pull
// later we'll pull the default layout from the config and then check
// it against user preference.
Layout::selectLayout(Config::get(self::CONFIG_LAYOUT));
$this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . Layout::getLayout() . '/' . $viewPath . self::VIEW_EXT;
if (!file_exists($this->viewPath)) {
$this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . 'main/' . $viewPath . self::VIEW_EXT;
}
$this->driver = self::DRIVER_PREFIX . $driver . self::VIEW_SUFFIX;
if (!class_exists($this->driver)) {
die('Invalid driver.');
}
$this->data = $data;
}
示例5: deliveryResponse
private static function deliveryResponse()
{
$isAjax = Request::isAjax();
if ($isAjax) {
if (empty(self::$_reply) || !is_array(self::$_reply)) {
exit('No reply seted by ajax controller or reply is not an array');
}
foreach (self::$_reply as $key => $value) {
if ($key != 'reply' && !is_numeric($value) && !is_array($value) && $value) {
self::$_reply[$key] = Language::translation($value);
}
}
Request::responseHeader();
echo json_encode(self::$_reply);
} else {
Layout::MenuFooterAutoload();
Layout::replaceTag();
Layout::translation();
Request::responseHeader();
echo Layout::getLayout();
}
}
示例6: Layout
//Create objects
$layout = new Layout();
$register = new Validation();
$db = new Db();
?>
<html>
<head>
<title>Welcome to OpenRPS</title>
<link rel="stylesheet" href="openrps_core/css/main.css"/>
<link rel="stylesheet" href="openrps_core/css/dashboard.css"/>
</head>
<body>
<?php
$layout->getLayout("header_loggedin");
?>
<!-- Service listing -->
<div class="two columns">
<p><h3>Your Profile</h3></p>
<p><a href="change_personal_info.php">Change Personal Info</a></p>
<p><a href="delete_account.php">Delete Your Account</a></p>
</div>
<h2>Hi <?php
print $username;
?>
, Welcome to OpenRPS!</h2>
<?php
示例7: Layout
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<?php
include 'openrps_core/eng/Layout.php';
include 'openrps_core/eng/Validation.php';
include_once 'openrps_core/eng/Db.php';
//Set the title
$title = 'Sign Up for OpenRPS';
//Create objects
$layout = new Layout();
$validation = new Validation();
$db = new Db();
//Render layout
$layout->getLayout("header");
//Set post variables
$username = $_POST['username'];
$password = $_POST['password'];
$password_confirm = $_POST['password_confirm'];
$email = $_POST['email'];
//Validate form
//check passwords
if ($password != $password_confirm) {
echo "<div class=\"danger alert\">Your passwords don't match!</div>";
return;
}
$reg_status = $validation->valCheckEmpty($username, $password, $email);
if ($reg_status != 'true') {
echo "<div class=\"danger alert\">{$reg_status}</div>";
}
if ($reg_status == 'true') {
示例8:
?>
<html>
<head>
<!-- CSS Libraries -->
<link rel="stylesheet" href="openrps_core/css/vendor/normalize.css"/>
<link rel="stylesheet" href="openrps_core/css/vendor/foundation.min.css"/>
<!-- CSS code -->
<link rel="stylesheet" href="openrps_core/css/main.css"/>
<link rel="stylesheet" href="openrps_core/css/promotional.css"/>
</head>
<body>
<?php
$layout->getLayout("header_notloggedin");
?>
<section class="hero">
<div class="hero-text">
<h1><span class="dark-transparent-bg">Welcome to OpenRPS</span></h1>
<h3><span class="dark-transparent-bg">The RBE system</span></h3>
</div>
</section>
<section class="row">
<div class="columns large-4 showcase-card">
<img src="img/resource_tracking.svg"/>
<h4>Resource Tracking</h4>
<p>
Tracks the resources real time in any environment.
</p>