当前位置:Gxlcms > PHP教程 > 每天laravel-20160820|ContextualBinding

每天laravel-20160820|ContextualBinding

时间:2021-07-01 10:21:17 帮助过:22人阅读

concrete = $concrete;        $this->container = $container;// set the    }    /**     * Define the abstract target that depends on the context.     *     * @param  string  $abstract     * @return $this     */    public function needs($abstract)    {        $this->needs = $abstract;        return $this;    }// function is needs    /**     * Define the implementation for the contextual binding.     *     * @param  \Closure|string  $implementation     * @return void     */    public function give($implementation)    {        $this->container->addContextualBinding($this->concrete, $this->needs, $implementation);    }// Define the implementation for the contextual binding}

人气教程排行