call Model's attribute

how can I call an Model’s attribute from an inner function??

Can you explain with an example what you would try to do?

hmmm…

class home extends \yii\db\ActiveRecord

{

public static function tableName()


{


    return 'tblhome';


}





static function()


{


    $var = IDHome;


} 

}

Why are you using ‘static’ function (and tableName() has not ‘static’ attribute) ?

From a function:




class Home extends \yii\db\ActiveRecord

{

     public function testVar()

     {

          // IDHome in an instance var

          $var = $this->IDHome;

     }

}



Thank you…

and I found the error …

I did not understand what the tableNme()