本文整理汇总了PHP中Controller::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::view方法的具体用法?PHP Controller::view怎么用?PHP Controller::view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::view方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index($name = '')
{
//echo "allo " . $name;
//$user = $this -> model ('User');
//$user->name = $name;
parent::view('home/index', ['name' => $name]);
}
示例2: view
/**
* Display the view.
*
* @param string $name
* @param array $data
*
* @return \Illuminate\View\View
*/
protected function view($name, array $data = [])
{
if (!is_null($this->viewNamespace)) {
$name = "{$this->viewNamespace}::{$name}";
}
return parent::view($name, $data);
}
示例3: index
public function index()
{
$db = Controller::model('DBconnect', '');
$res = "Main";
$module = Controller::module('works/index');
$news = Controller::module('news/index');
Controller::view('home/index', array('name' => $res, 'module' => $module, 'news' => $news));
}
示例4: __exception_response
function __exception_response($code, $exception)
{
$resp = resp()->reset()->setCode($code);
if (DEBUG) {
foreach (__exception_header($exception) as $header) {
$resp->setHeader($header);
}
}
if (req()->isAjax()) {
return $resp;
}
$body = \Controller::view()->render('_error', array('exception' => $exception));
$resp->setBody($body);
return $resp;
}
示例5: view
public function view()
{
parent::view();
$auth_accounts = array();
$poauthlimit = $this->_uses[$this->modeltype];
// build an array of the auth accounts, with the account number as the key
foreach ($poauthlimit->authaccounts as $auth_account) {
// build the key
$parts = explode('-', $auth_account->glaccount);
$key = trim($parts[0]);
// output as array
$auth_accounts[$key] = $auth_account->glaccount;
}
// sort the array by it's key
// this will allow the output to be in numerical order
ksort($auth_accounts);
$this->view->set('authaccounts', $auth_accounts);
$this->view->set('no_ordering', true);
}
示例6: login
public static function login()
{
if (isset($_POST['email'])) {
parent::model('BD');
$value = BD::Login($_POST['email'], $_POST['password']);
if ($value == 1) {
$_SESSION['AdminUser'] = $_POST['email'];
parent::view('AdminMain');
} else {
if ($value == 0) {
$_SESSION['MiseurUser'] = $_POST['email'];
parent::view('MiseurMain');
} elseif ($value == -1) {
parent::view('Accueil');
}
}
} else {
self::index();
}
}
示例7: Autoloader
<?php
require_once 'System/Settings.php';
require_once 'System/Autoloader.php';
require_once 'System/Factory.php';
require_once 'System/Controller.php';
require_once 'System/SystemLog.php';
require_once 'System/Model.php';
$autoloader = new Autoloader($AutoLoad);
$start = new Controller();
try {
$start->run();
} catch (Exception_404 $e) {
$start->view('Exceptions/404', false);
$start->show(array('ERROR_MSG' => $e->getMessage()));
} catch (Exception_Login $e) {
$start->view('Exceptions/Login', false);
$start->show(array('ERROR_MSG' => $e->getMessage()));
} catch (Exception $e) {
$start->view('Exceptions/Exception', false);
$start->show(array('ERROR_MSG' => $e->getMessage()));
}
示例8: logtrace
logtrace("Index: Route(2): {$class}({$call})", null);
$C = new $class($call);
$C->{$call}();
} else {
if (count($route) == 3) {
logtrace("Index: Route(3): {$class}({$call},{$action})", null);
$C = new $class($call, $action);
$C->{$call}($action);
} else {
if (count($route) > 3) {
$action = implode('/', array_slice($route, 2));
logtrace("Index: Route(3+): {$class}({$call},{$action})", null);
$C = new $class($call, $action);
$C->{$call}($action);
}
}
}
}
} else {
$C = new Controller("index");
$C->index();
}
Ork3::$Lib->session->times['Route Complete'] = time();
$CONTENT = $C->view();
Ork3::$Lib->session->times['Composite'] = time();
echo $CONTENT;
logtrace("Timing Information", Ork3::$Lib->session->times);
if (DUMPTRACE) {
logtrace('Session', $_SESSION);
dumplogtrace();
}
示例9: index
public function index($name = '')
{
parent::view('Accueil/index');
}
示例10: log
public function log()
{
parent::model("docs");
$_model = new docs();
//Contient toutes les données à afficher
$data = array();
if (isset($_POST["logText"])) {
if ($_POST["logText"] != "") {
$_model->SaveLog($_SESSION['ID'], $_POST["logText"]);
}
}
$data['logs'] = $_model->LoadLog($_SESSION['ID']);
$data['logs'] = array_reverse($data['logs']);
parent::view("shared/header");
parent::view("intern/menu");
parent::view('intern/log', $data);
parent::view('shared/footer');
}
示例11: index
public function index()
{
Controller::view('about/index', array());
}
示例12: index
public function index()
{
session_unset();
session_destroy();
parent::view('Accueil');
}
示例13: review
public function review($_projectID)
{
parent::view("shared/header");
parent::view("cie/menu");
parent::model("projects");
$model = new projects();
if ($_projectID != null || isset($_POST['project'])) {
parent::model("docs");
$model1 = new docs();
parent::model("projects");
$model2 = new projects();
if (isset($_POST['project'])) {
$project = $model2->ShowProjectByID($_POST['project']);
} else {
$project = $model2->ShowProjectByID($_projectID[0]);
}
if ($project != null) {
parent::model("business");
$model4 = new business();
$cie = $model4->ShowCieByUserID($_SESSION['ID']);
if ($project->status == 1 && $project->businessID == $cie->ID) {
$data['title'] = $project->title;
$data['projectID'] = $project->ID;
$internId = $project->internID;
if ($internId != null) {
//Vérifier l'existence d'une évaluation de stage
$data['readOnly'] = $model1->ReadOnlyAdvisor($internId, 'cieReview');
parent::model("accounts");
$model3 = new accounts();
$data['intern'] = $model3->ShowUserByID($internId);
if ($data['readOnly']) {
//si le formulaire existe
$data['review'] = $model1->LoadAdvisor($internId, "cieReview");
$data['alert'] = "alert-warning";
$data['message'] = "L'évaluation pour ce stagiaire et pour ce projet existe déjà.";
} else {
//si le formulaire n'existe pas
//Enregistrer le formulaire d'évaluation.
if (isset($_POST['sendReview']) && isset($_POST['project']) && $_SESSION['form_timer'] + 1200 > time()) {
try {
$_POST['intern'] = $internId;
$model1->SaveAdvisor($_SESSION['ID'], "cieReview", $_POST);
$data['review'] = $model1->LoadAdvisor($internId, 'cieReview');
$data['alert'] = "alert-success";
$data['message'] = "L'évaluation a été enregistrée avec succès.";
$data['readOnly'] = true;
} catch (Exception $e) {
$data['alert'] = "alert-warning";
$data['message'] = "L'évaluation n'a pas pu être enregistrée.";
}
}
}
parent::view("cie/review", $data);
parent::view("shared/footer");
} else {
$data['alert'] = "alert-warning";
$data['message'] = "Aucun stagiaire associé à ce projet.";
$this->index($data);
}
} else {
$data['alert'] = "alert-warning";
$data['message'] = "Il vous est interdit de visualiser ce formulaire.";
$this->index($data);
}
} else {
$data['alert'] = "alert-warning";
$data['message'] = "Ce projet n'existe pas.";
$this->index($data);
}
} else {
$this->index(null);
}
}
示例14: logout
public function logout()
{
setcookie("token", '', time() - 1, '/');
session_unset();
session_destroy();
//Message d'alerte.
$data['alert'] = "alert-success";
$data['message'] = "Vous avez été déconnectés avec succès.";
parent::view('shared/header');
parent::view('home/menu');
parent::view('home/index', $data);
parent::view('shared/footer');
}
示例15: AccesRefuse
public function AccesRefuse()
{
parent::view('Tools/refuse');
}