Is it ok to assign data into $data in a Controller using $this in order to make it accessablethrough any method in any "child" controller
Code:
class MY_Controller extends CI_Controller
{
protected $data = array();
function __construct()
{
parent::__construct();
$this->data['brand'] = 'myCompany';
.....
And now, another Controller extends MY_controller. It has a method that loads a view and passes $data to this view, like this:
Code:
$this->load->view('start.php', $this->data);
It's works and it is handy, but is it OK, is it good practice?