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}
登录后复制


09-11 05:33