當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Toolbox::getArrayParameter方法代碼示例

本文整理匯總了PHP中Toolbox::getArrayParameter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::getArrayParameter方法的具體用法?PHP Toolbox::getArrayParameter怎麽用?PHP Toolbox::getArrayParameter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Toolbox的用法示例。


在下文中一共展示了Toolbox::getArrayParameter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: alwaysAction

 /**
  * always function, to be executed every time
  *
  */
 public function alwaysAction()
 {
     if (isset($this->languages['views'][strtolower($this->Request['controller'])][strtolower($this->Request['action'])]) && isset($this->languages['general'])) {
         $this->view->languages = array_merge_recursive($this->languages['views'][strtolower($this->Request['controller'])][strtolower($this->Request['action'])], $this->languages['general']);
     } else {
         if (isset($this->languages['general'])) {
             $this->view->languages = $this->languages['general'];
         }
     }
     $this->view->setMessage(Toolbox::getArrayParameter($this->Request, 'message', ''), Toolbox::getArrayParameter($this->Request, 'messageType', 'success'));
 }
開發者ID:bachkoutou,項目名稱:Simple-MVC,代碼行數:15,代碼來源:CoreController.php

示例2: header

<?php

header('Content-Type=text/html; charset=UTF-8');
function exception_error_handler($errno, $errstr, $errfile, $errline)
{
    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
//set_error_handler("exception_error_handler");
require_once dirname(__FILE__) . '/../conf/configuration_front.php';
require_once dirname(__FILE__) . '/../core/autoloadManager.php';
autoloadManager::setSaveFile(dirname(__FILE__) . '/../tmp/front.php');
autoloadManager::addFolder(CORE);
autoloadManager::addFolder(BUSINESS);
spl_autoload_register('autoloadManager::loadClass');
$_REQUEST['controller'] = Toolbox::getArrayParameter($_REQUEST, 'controller', 'Feed');
$_REQUEST['action'] = Toolbox::getArrayParameter($_REQUEST, 'action', 'index');
// jquery based ajax application
$from = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && 'XMLHttpRequest' === $_SERVER['HTTP_X_REQUESTED_WITH'] ? 'ajax' : 'http';
try {
    $front = frontDispatcher::getInstance();
    // Init Session
    // Save header for ajax call, so that we can either root or return false for ajax calls
    $actions = AccessHelper::getActions();
    // authenticate
    $AuthManager = new AuthManager($actions);
    $AuthManager->authenticate($front, '/?controller=Feed&action=index', $from);
    // Inject Dynamically changing objects
    $Container = ContainerFactory::get('front');
    $Container['Access'] = $actions;
    $Container['AuthManager'] = $AuthManager;
    $Container['Request'] = $_REQUEST;
開發者ID:bachkoutou,項目名稱:Simple-MVC,代碼行數:31,代碼來源:index.php


注:本文中的Toolbox::getArrayParameter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。