• Yii ServiceLocator.php


      public function getComponents($returnDefinitions = true)
        {
            return $returnDefinitions ? $this->_definitions : $this->_components;
        }
    
        /**
         * Registers a set of component definitions in this locator.
         *
         * This is the bulk version of [[set()]]. The parameter should be an array
         * whose keys are component IDs and values the corresponding component definitions.
         *
         * For more details on how to specify component IDs and definitions, please refer to [[set()]].
         *
         * If a component definition with the same ID already exists, it will be overwritten.
         *
         * The following is an example for registering two component definitions:
         *
         * ```php
         * [
         *     'db' => [
         *         'class' => 'yiidbConnection',
         *         'dsn' => 'sqlite:path/to/file.db',
         *     ],
         *     'cache' => [
         *         'class' => 'yiicachingDbCache',
         *         'db' => 'db',
         *     ],
         * ]
         * ```
         *
         * @param array $components component definitions or instances
         */
        public function setComponents($components)
        {
            foreach ($components as $id => $component) {
                $this->set($id, $component);
            }
        }

    配置文件中的componets数组都到了这里

  • 相关阅读:
    Qt 字符串QString arg()用法总结
    Qt子窗口QMidSubwindow全屏出现的问题总结
    QString介绍
    Qt控制台输出QString
    汽车辐射监测系统-Qt开发[转]发
    Eclipse Qt开发环境的建立
    串口调节工具
    QT 多线程程序设计 -互斥
    ArcGIS Spatial Query
    IQueryFielter接口
  • 原文地址:https://www.cnblogs.com/a-flydog/p/6782241.html
Copyright © 2020-2023  润新知