何时使用$ this-> $属性

时间:2015-05-30 22:19:36

标签: php class oop methods

我无法理解何时以及为何需要使用$ this-> $属性。因此,将$添加到this关键字和property。我只在魔术方法__get()__set()中使用了这个。任何人都可以详细说明吗?

1 个答案:

答案 0 :(得分:4)

self.view.addSubview(self.pageViewController!.view) // !! -- viewDidAppear for CameraViewController called here 包含属性名称时可以使用UIImagePickerController; CameraViewController包含函数名称时$this->$property可以使用$property

示例:

$this->$function()