이동, 당신은 모든이뿐만 아니라 system/core/Loader.php
에서 트리거를
public function __construct()
{
self::$instance =& $this;
foreach (is_loaded() as $var => $class)
{
$this->$var =& load_class($class);
}
$this->load =& load_class('Loader', 'core');
$this->load->initialize();
log_message('info', 'Controller Class Initialized');
}
테이크 모양을 얻을 선 아래에 볼 수 있습니다,이 같은 (->view()
관련)
를 볼 수 있습니다
/**
* View Loader
*
* Loads "view" files.
*
* @param string $view View name
* @param array $vars An associative array of data
* to be extracted for use in the view
* @param bool $return Whether to return the view output
* or leave it to the Output class
* @return object|string
*/
public function view($view, $vars = array(), $return = FALSE)
{
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
}
모든 것은 CI_controller에서 온 것입니다 –
당신은 codeigniter에서'library'를 사용하여 그것을 달성 할 수 있습니다 또한 당신이 원하는 것을 명확히하십시오 chieve? –
@Rajeevbbqq im는 codeigniter 프레임 워크가 변수에 대한 메소드를 호출하는 방법을 알고 있습니다. 예를 들어 $ this-> load는 가변적이며, 메소드를 호출합니다. 어떻게 구현 했습니까? 메신저 내부 메커니즘에 대해 얘기 –