$data = Test::model()->findByAttributes(array('id' => $id));
As I understand, all the attributes are stored in the $data->_attrib
array, but the problem is that it is private and I cannot access it. Is it possible to pull out all the values of the _attrib
array, and even better to get an associative array of the form mas[attrib] = value;
?
( new Test() )->attributes
. Docs - Roman Grinyov