Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t访问PHP的某些对象属性(RedBeanPhp对象)_Php_Object_Properties_Get_Redbean - Fatal编程技术网

Can';t访问PHP的某些对象属性(RedBeanPhp对象)

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

我有我的对象的var_dump。这是输出。在我的代码中,对象是$d->depositType。当我回显$d->depositType->id或$d->depositType->years时,我得到了我想要的值。但当我试图进入$d->depositType->name或$d->depositType->name时,我得到了空值。谁能帮帮我吗?先谢谢你

    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
有。

它仍然给我空值