每天laravel-20160820| ContextualBinding
来源:互联网 发布:淘宝 seo 教程 编辑:程序博客网 时间:2024/06/05 14:20
<?phpnamespace Illuminate\Container;use Illuminate\Contracts\Container\ContextualBindingBuilder as ContextualBindingBuilderContract;class ContextualBindingBuilder implements ContextualBindingBuilderContract{ /** * The underlying container instance. * * @var \Illuminate\Container\Container */ protected $container;// The underlying container instance /** * The concrete instance. * * @var string */ protected $concrete;// a instance about concrete /** * The abstract target. * * @var string */ protected $needs;// a target about the abstract /** * Create a new contextual binding builder. * * @param \Illuminate\Container\Container $container * @param string $concrete * @return void */ public function __construct(Container $container, $concrete) { $this->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}
0 0
- 每天laravel-20160820| ContextualBinding
- 每天laravel
- 每天laravel-20160620|MemcachedConnector
- 每天laravel-20160622|MeacachedStore
- 每天laravel-20160623|NullStore
- 每天laravel-20160624|RateLimiter
- 每天laravel-20160625|RedisStore
- 每天laravel-20160626|RetrievesMultipleKeys
- 每天laravel-20160627|TaggableStore
- 每天laravel-20160628|TaggedCache
- 每天laravel-20160629|RedisTaggedCache
- 每天laravel-20160701|Repository
- 每天laravel-20160702|CacheTableCommand
- 每天laravel-20160703|ClearCommand
- 每天laravel-20160704|CahceHit
- 每天laravel-20160705|CahceMissed
- 每天laravel-20160706|KeyForgotten
- 每天laravel-20160707|KeyWritten
- 二分查找
- WinForm支持拖拽效果
- Android绘图技术详解,带你轻松绘出各种图形
- 产品经理应该掌握的技能(一)
- Solr4.2教程 配置文件属性等
- 每天laravel-20160820| ContextualBinding
- Failed to connect to repository database. OMS will be automatically restarted once it identifies tha
- ios build failed 因为xcode缓存原因
- CF 55D 数位DP
- Oracle 12c OCM 直考体验
- 辗转相除
- Tomcat启动时提示端口号冲突
- iOS block传值
- 根据excel模板导出excel