PHP: “Declaration of … should be compatible with that of …”

前端 未结 2 1825
温柔的废话
温柔的废话 2021-01-06 07:13

I\'d like to create an interface for entities that are CRUDable (can be saved and deleted). Here is my abstract class:

abstract class AbstractCrudableEntity          


        
2条回答
  •  天涯浪人
    2021-01-06 07:42

    Your child methods must have the same number of parameters as the abstract methods in an abstract parent class.

    The constructor in you example is not abstract--the child is just overriding it.

提交回复
热议问题