Can';t访问PHP的某些对象属性(RedBeanPhp对象)
我有我的对象的var_dump。这是输出。在我的代码中,对象是$d->depositType。当我回显$d->depositType->id或$d->depositType->years时,我得到了我想要的值。但当我试图进入$d->depositType->name或$d->depositType->name时,我得到了空值。谁能帮帮我吗?先谢谢你Can';t访问PHP的某些对象属性(RedBeanPhp对象),php,object,properties,get,redbean,Php,Object,Properties,Get,Redbean,我有我的对象的var_dump。这是输出。在我的代码中,对象是$d->depositType。当我回显$d->depositType->id或$d->depositType->years时,我得到了我想要的值。但当我试图进入$d->depositType->name或$d->depositType->name时,我得到了空值。谁能帮帮我吗?先谢谢你 object(RedBean_OODBBean)[47] private 'flagSkipBeau' => boolea
object(RedBean_OODBBean)[47]
private 'flagSkipBeau' => boolean false
private 'properties' =>
array (size=4)
'id' => string '1' (length=1)
'Name' => string 'Year Deposit' (length=12)
'Percentage' => string '10.00' (length=5)
'years' => string '1' (length=1)
private '__info' =>
array (size=4)
'type' => string 'depositType' (length=11)
'sys.id' => string 'id' (length=2)
'sys.orig' =>
array (size=4)
'id' => string '1' (length=1)
'Name' => string 'Year Deposit' (length=12)
'Percentage' => string '10.00' (length=5)
'years' => string '1' (length=1)
'tainted' => boolean false
private 'beanHelper' =>
object(RedBean_BeanHelper_Facade)[21]
private 'fetchType' => null
private 'withSql' => string '' (length=0)
private 'withParams' =>
array (size=0)
empty
private 'aliasName' => null
private 'via' => null
private 'writeOnly' => boolean false
PHP对变量区分大小写:
$d->存款类型->名称
不存在
$d->depositType->Name
有。它仍然给我空值