当前位置: 首页>>代码示例>>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;未经允许,请勿转载。