Check if function has been called yet

前端 未结 5 2104
挽巷
挽巷 2020-12-20 23:02

New to OOP in PHP

One of my functions requires another function to be executed before running. Is there a way I can check this?

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 23:48

    The observer pattern can be used to do what you want (notify observers the event is going to happen so they can do something).

提交回复
热议问题