How to get a specific value of var_dump() in yii2?

Hi guys,


var_dump($dataProvider);

throws out following output




 .

 .

 .

 19 => 

        object(app\models\Bewerbungen)[219]

          private '_attributes' (yii\db\BaseActiveRecord) => 

            array (size=12)

              ...

          private '_oldAttributes' (yii\db\BaseActiveRecord) => 

            array (size=12)

              ...

          private '_related' (yii\db\BaseActiveRecord) => 

            array (size=2)

              ...

          private '_errors' (yii\base\Model) => null

          private '_validators' (yii\base\Model) => null

          private '_scenario' (yii\base\Model) => string 'default' (length=7)

          private '_events' (yii\base\Component) => 

            array (size=0)

              ...

          private '_behaviors' (yii\base\Component) => 

            array (size=0)

              ...

  private '_totalCount' (yii\data\BaseDataProvider) => int 44

  private '_events' (yii\base\Component) => 

    array (size=0)

      empty

  private '_behaviors' (yii\base\Component) => null



I just need folowing value of var_dump():




private '_totalCount' (yii\data\BaseDataProvider)  =>int 44



Any ideas how to pick out this value(44) of $dataprovider. I tried witch several foreach()-loops,but I didn’t succeed

That’s a private property. Since it’s in a model, you can’t access it outside of that model. If you make it public you can access it as you would any other object property.

What does this value represent? There may be another way to get it.