当前位置: 首页>>代码示例>>PHP>>正文


PHP Slim::getDefaultSettings方法代码示例

本文整理汇总了PHP中Slim\Slim::getDefaultSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Slim::getDefaultSettings方法的具体用法?PHP Slim::getDefaultSettings怎么用?PHP Slim::getDefaultSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Slim\Slim的用法示例。


在下文中一共展示了Slim::getDefaultSettings方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getDefaultSettings

    /**
     * Get default application settings with Nius addings
     * @return array
     */
    public static function getDefaultSettings()
    {
        $config = parent::getDefaultSettings();

        //Nius additions
        $config['view'] = '\Nius\Core\View';
        $config['log.dir'] = './log';
        $config['log.file'] = 'debug.log';
        $config['log.dateformat'] = "Y-m-d H:i:s";
        $config['log.writer'] = new \Nius\Core\LogWriter(
            $config['log.dir'],
            $config['log.file'],
            $config['log.dateformat']
        );

        return $config;
    }
开发者ID:NiusFramework,项目名称:core,代码行数:21,代码来源:App.php

示例2: getDefaultSettings

 /**
  * Override default settings
  *
  * @return array
  */
 public static function getDefaultSettings()
 {
     $settings = parent::getDefaultSettings();
     $settings['templates.path'] = '';
     $settings['bono.base.path'] = '..';
     $settings['bono.theme'] = 'Bono\\Theme\\DefaultTheme';
     $settings['config.path'] = '../config';
     // slim settings debug MUST BE set true to propagate exception/error to middleware
     // commonhandlermiddleware will handle this later
     $settings['debug'] = true;
     $settings['autorun'] = true;
     $settings['bono.cli'] = PHP_SAPI === 'cli';
     if (!isset($settings['bono.debug'])) {
         $settings['bono.debug'] = $settings['mode'] == 'development' ? true : false;
     }
     $settings['view'] = 'Bono\\View\\LayoutedView';
     $settings['bono.partial.view'] = 'Slim\\View';
     return $settings;
 }
开发者ID:xinix-technology,项目名称:bono,代码行数:24,代码来源:App.php

示例3: getDefaultSettings

 public static function getDefaultSettings()
 {
     return array_merge(array("late-static-binding" => true), parent::getDefaultSettings());
 }
开发者ID:DonaldNgai,项目名称:PHPAuthentication,代码行数:4,代码来源:SlimTest.php

示例4: getDefaultSettings

 public static function getDefaultSettings()
 {
     $original = parent::getDefaultSettings();
     return array_merge($original, ['container' => new Container()]);
 }
开发者ID:hedronium,项目名称:tetra,代码行数:5,代码来源:Tetra.php

示例5: getDefaultSettings

 /**
  * Combine the default Slim configuration with
  * the default Spore configuration
  *
  * @return array
  */
 static function getDefaultSettings()
 {
     $default = parent::getDefaultSettings();
     $extended = array("debug" => "true", "content-type" => "application/json", "gzip" => true, "services" => array(), "pass-params" => true, "templates.path" => realpath(dirname(__DIR__) . "/examples/templates"), "include-examples" => true, "deserializers" => array("application/json" => "\\Spore\\ReST\\Data\\Deserializer\\JSONDeserializer", "application/xml" => "\\Spore\\ReST\\Data\\Deserializer\\XMLDeserializer", "text/xml" => "\\Spore\\ReST\\Data\\Deserializer\\XMLDeserializer", "text/csv" => "\\Spore\\ReST\\Data\\Deserializer\\CSVDeserializer", "application/x-www-form-urlencoded" => "\\Spore\\ReST\\Data\\Deserializer\\FormDeserializer", "multipart/form-data" => "\\Spore\\ReST\\Data\\Deserializer\\FormDeserializer"), "serializers" => array("application/json" => "\\Spore\\ReST\\Data\\Serializer\\JSONSerializer", "application/xml" => "\\Spore\\ReST\\Data\\Serializer\\XMLSerializer", "text/xml" => "\\Spore\\ReST\\Data\\Serializer\\XMLSerializer"), "xml-top-node" => "data", "xml-node" => "element");
     return array_merge($default, $extended);
 }
开发者ID:dannykopping,项目名称:spore,代码行数:12,代码来源:Spore.php

示例6: getDefaultSettings

 public static function getDefaultSettings()
 {
     $defaults = parent::getDefaultSettings();
     $controllers = '\\App\\Controller';
     $models = '\\App\\Model';
     return $defaults + array('api.classes.output' => '\\Deal\\Middleware\\Output\\Json', 'api.classes.auth' => '\\Deal\\Middleware\\Auth', 'api.classes.error' => '\\Deal\\Middleware\\Error', 'api.classes.auth.adapter' => '\\Deal\\Middleware\\Auth\\None', 'api.classes.auth.storage' => '\\Deal\\Middleware\\Auth\\Storage\\None', 'app.controllers.paths' => array($controllers), 'app.models.paths' => array($models));
 }
开发者ID:dwsla,项目名称:deal,代码行数:7,代码来源:Deal.php


注:本文中的Slim\Slim::getDefaultSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。