As you might expect, adding a new rule is a simple matter of creating a rule class and adding an extension to the plug-in.
您可能会想,添加一条新规则,要比创建规则类和向插件添加一个扩展容易。
Perhaps it's a case for duck typing, the principle that it doesn't really matter what an object is, in terms of class and module, but only what it does.
可能这就是duck typing的一个例子,duck typing所代表的原则是,无论对象属于什么类或者模块,关系都不大,关键在于它做些什么。
Now the task of retrieving all clients participating in an event is simply a matter of writing a finder method in the client home interface, and an SQL query in the helper finder class.
现在,检索所有参与活动的客户的任务只是在Client宿主接口中编写finder方法和在helper finder类中编写SQL查询。
应用推荐