据我所知,Laravel将其扩展的接口称为契约,因为它们由Laravel使用.但这似乎有点像循环推理.仅仅因为您的项目使用了现有PHP特性,所以更改现有PHP特性的术语不会增加任何价值.

Is there something more to it? What's the logic behind coining a new term for something that's a standard PHP feature? Or is there some feature of Contracts that are not already in Interfaces?

Edit: To clarify, it's the usage of Contract as a proper noun in the documentation that has me confused, as explained in my comment on Thomas's post

推荐答案

这只是一个很好的词来描述使用接口的 idea .

Laravel契约只是PHP接口,所以它们不提供任何其他功能.

You can read more on this subject in the documentation http://laravel.com/docs/5.1/contracts

Laravel相关问答推荐

我是否需要/是否可以从控制器运行LARLAVEL备份?

Livewire 3分页在点击后不更新页面

将错误消息抛出并显示为关联数组

Laravel Livewire 组件属性在 div 类中为空

如何判断用户Electron邮件是否已存在

Eloquent的条件过滤器

Laravel 5.4 - 如何为同一个自定义验证规则使用多个错误消息

如何在 laravel 中使用 str_replace

刚安装 Lumen 并得到 NotFoundHttpException

实施 Payum/Laravel 定期付款

链接到容器时如何使用主机网络?

Laravel 将 JSON 转换为数组?

Twilio 查找 API 不起作用?

SQLSTATE [42000]:语法错误或访问冲突:1066 Not unique table/alias on relationship

条带 api 判断现有卡

Laravel 随机排序

如何利用 StorageFacade 的 Filesystem 类的 glob 方法?

Laravel 5.3 通知 - 仅使用Electron邮件地址通知

如何获取 Laravel 块的返回值?

Laravel binding绑定的用途和目的是什么?