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


PHP Slim::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct(array('templates.path' => TEMPLATE_PATH, 'view' => new RainTplView()));
     $this->container->singleton('mysuperclass', function ($container) {
         return new MySuperClass();
     });
 }
开发者ID:heanfig,项目名称:slim_primeros_pasos,代码行数:7,代码来源:ControllerLibrary.php

示例2: __construct

 /**
  * Constructor
  * calls parent Slim::__construct
  * @param   array $userSettings
  * @return  void
  */
 public function __construct($userSettings = array())
 {
     $this->settings = array_merge_recursive(array('meta' => array('title' => 'Slimplr Framework', 'about' => 'A fork of http://www.slimframework.com/'), 'templates.path' => './templates', 'templates.default' => 'page_html5.php', 'navigation' => array('main' => array('filter' => array('status' => 'online'), 'level' => array('start' => 0, 'depth' => 100), 'modus' => 'nested'), 'global' => array('filter' => array('status' => 'online'), 'selection' => array('global' => "true"), 'level' => array('start' => 0, 'depth' => 100), 'modus' => 'nested'), 'breadcrumb' => array('filter' => array('status' => 'online'), 'selection' => array('first' => 1, 'current' => 1, 'parent' => 1), 'level' => array('start' => 0, 'depth' => 100), 'modus' => 'linear'), 'context' => array('filter' => array('status' => 'online'), 'selection' => array('current' => 1, 'child' => 1, 'brother' => 1), 'level' => array('start' => 0, 'depth' => 100), 'modus' => 'nested'))), $userSettings);
     parent::__construct($this->settings);
     #show($this->settings['meta']['about']);
     #show($this->settings['mode']);
     #show($this->request);
     $this->getRouting();
     #$this->run();
 }
开发者ID:rs3d,项目名称:Slimplr,代码行数:16,代码来源:Slimpr.php

示例3: __construct

    public function __construct($userSettings = array())
    {
        parent::__construct($userSettings);
        $this->add(new Slim_Middleware_SessionCookie());


        $this->config('db', $this->initDb());
        $this->config('source', $this->initSource());

        $this->view()->appendData(array(
            'app' => $this,
            'translation' => include 'assets/translation/de.php',
            'language' => 'de'
        ));

        $app = $this;
        $this->get('/', function () use ($app) {
            $app->render('index.php', array(
                'action' => 'index'
            ));
        })->via('GET', 'POST')->name('index');

        $this->get('/system', function () use ($app) {
            $system = new Shopware_Components_Check_System();
            $app->render('system.php', array(
                'action' => 'system',
                'system' => $system,
                'error' => false
            ));
        })->via('GET', 'POST')->name('system');

        $this->get('/update', function () use ($app) {
            echo "SET NAMES 'utf8';\n";
            echo "SET FOREIGN_KEY_CHECKS = 0;\n";
            echo "ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;\n\n";
            $export = new Shopware_Components_DbDiff_Mysql(
                $this->config('source'),
                $this->config('db')
            );
            $tables = $export->listTables();
            foreach($tables as $table) {
                echo $export->getTableUpdate($table);
            }
        })->via('GET', 'POST')->name('backup');

        $this->get('/backup', function () use ($app) {
            $skipTables = array(
                's_articles_translations',
                's_search_index',
                's_search_keywords',
                's_core_log',
                's_core_sessions'
            );

            echo "SET NAMES 'utf8';\n";
            echo "SET FOREIGN_KEY_CHECKS = 0;\n\n";
            $export = new Shopware_Components_DbExport_Mysql(
                $this->config('db')
            );
            $tables = $export->listTables();
            foreach($tables as $table) {
                $export->setTable($table);
                foreach($export as $line) {
                    echo $line;
                    if(in_array($table, $skipTables)) {
                        break;
                    }
                }
            }
        })->via('GET', 'POST')->name('backup');

        //Shopware_Components_DbExport_Mysql
    }
开发者ID:nhp,项目名称:shopware-4,代码行数:73,代码来源:Install.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:7,代码来源:class.ilRestServer.php


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