Migration - Model - __get - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18) +--- Thread: Migration - Model - __get (/showthread.php?tid=87445) |
Migration - Model - __get - kaudy - 04-20-2023 Hi!! I'm trying to migrate a project from codeigniter 1.7.2 to 2.x.x and later to 3.x.x. How do I use the magic method __get in the model to access the value of attributes in the controller? When trying to print the value of the attributes it returns as null. Only returns when attributes are public. Tksss!! example: Model: Code: class Usuario extends CI_Model { Code: class Homologacaoc extends CI_Controller { |