當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。