What does “return $this” mean?

前端 未结 7 421
遇见更好的自我
遇见更好的自我 2020-12-13 00:34

I\'m trying to understand this code, and when I arrived at the final line, I didn\'t get it. :(

Can I have your help in order to find out, what does re

相关标签:
7条回答
  • 2020-12-13 01:25

    If the SetOptions method is part of a ProgramOptions class or something, $this would refer to the class containing the method, so you would be passing back an instance of ProgramOptions.

    0 讨论(0)
提交回复
热议问题