zoukankan      html  css  js  c++  java
  • Laravel 7.8.1 框架分析

    Laravel运行图

    容器运行核心代码

    /**
         * Get the Closure to be used when building a type.
         *
         * @param  string  $abstract
         * @param  string  $concrete
         * @return Closure
         */
        protected function getClosure($abstract, $concrete)
        {
            return function ($container, $parameters = []) use ($abstract, $concrete) {
                if ($abstract == $concrete) {
                    return $container->build($concrete);
                }
    
                return $container->resolve(
                    $concrete, $parameters, $raiseEvents = false
                );
            };
        }
    
    /**
         * Get the Closure to be used when building a type.
         *
         * @param  string  $abstract
         * @param  string  $concrete
         * @return Closure
         */
        protected function getClosure($abstract, $concrete)
        {
            return function ($container, $parameters = []) use ($abstract, $concrete) {
                if ($abstract == $concrete) {
                    return $container->build($concrete);
                }
    
                return $container->resolve(
                    $concrete, $parameters, $raiseEvents = false
                );
            };
        }
    
  • 相关阅读:
    Git
    Qcon2016上海站PPT
    TeamCity
    在cmd界面,怎么样退出Node.js运行环境
    python 2.x与python3.x的区别
    d3.max()与d3.min()
    d3.svg.line() 曲线构造器
    d3.js 之SVG:矢量化图形绘制
    moment.js 时间格式化库
    directive
  • 原文地址:https://www.cnblogs.com/zhanghuizong/p/12890181.html
Copyright © 2011-2022 走看看