What does “return $this” mean?

前端 未结 7 446
遇见更好的自我
遇见更好的自我 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.

提交回复
热议问题