Getting property from object ActiveDataProvider

Hi , I get this result from ActiveDataProvider , so i want to get ‘person_id’ => int 12 , how can i get that information from this object ?

object(yii\data\ActiveDataProvider)[129]

public ‘query’ =>

object(yii\db\ActiveQuery)[126]


  public 'sql' => null


  public 'on' => null


  public 'joinWith' => null


  public 'select' => null


  public 'selectOption' => null


  public 'distinct' => null


  public 'from' => null


  public 'groupBy' => null


  public 'join' => null


  public 'having' => null


  public 'union' => null


  public 'params' => 


    array (size=0)


      empty


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


    array (size=0)


      empty


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


    array (size=0)


      empty


  public 'where' => 


    array (size=2)


      'person_id' => int 12

Thanks

maybe for this purpose will be better use ActiveRecord?

Create model, for instance, called Person and use it like


$person = Person::findOne(12);

Ok but i want to get that information from ActiveDataProvider?

i used this doc http://www.yiiframework.com/doc-2.0/yii-data-activedataprovider.html and think that it may help:

for instance you already have Person model


$query = Person::find();


$query->andFilterWhere(['=', 'person_id', 12]);


$dataProvider = new ActiveDataProvider([

    'query' => $query,

]);


$person = $dataProvider->getModels();

Ok thanks i solve it.