$this->_objectProperty 中的下划线是啥意思? [复制]

Posted

技术标签:

【中文标题】$this->_objectProperty 中的下划线是啥意思? [复制]【英文标题】:What does the underscore mean in $this->_objectProperty? [duplicate]$this->_objectProperty 中的下划线是什么意思? [复制] 【发布时间】:2019-06-18 02:10:57 【问题描述】:

我遇到过一个对象属性如下所示的实例:

$this->property

还有这个:

$this->_property

_-> 之前是什么意思?它在编码方面有什么不同?

【问题讨论】:

【参考方案1】:

通常用于提醒变量/函数是私有的。

【讨论】:

以上是关于$this->_objectProperty 中的下划线是啥意思? [复制]的主要内容,如果未能解决你的问题,请参考以下文章

SQL server基础objectproperty()函数

Python Kivy 错误:“kivy.properties.ObjectProperty”对象没有属性文本

AttributeError:“kivy.properties.ObjectProperty”对象没有属性“manager1”

Kivy ObjectProperty 更新标签文本

Kivy & pyvisa - 如何在 GPIB 连接后将 ObjectProperty 设置为 None?

如何将 ColorPicker 值属性绑定到 ScalaFX 中的 ScalaFX ObjectProperty?