سلام به همه
در codeigniter 3 به عناصر داخلی یک توابع در تابع دیگر دسترسی ندارم . مثلا


<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Main extends CI_Controller {

function __construct(){
parent::__construct();
$this->load->library(array('form_validation','email'));
$this->load->helper('captcha',TRUE);
$this->load->model('Hzr_Options','UserAuth');
}
public $test = array();

public function index(){
$this->test = 'test';
}


public function login(){
$this->template->build('admin/index',array('test' => var_dump($this->test)));
}

}



از داخل index تست رو دارم ولی از لاگین مثلا ندارم