_values = $datas; } // final public function __get($name) { return $this->_values[$name]; } final public function __set($name, $value) { $this->_values[$name] = $value; } final public function setDatas(array $datas) { foreach ($datas as $key => $value) { $this->_values[$key] = $value; } } final public function render($name, array $datas = []) { $fullPath = $this->_viewPath . DIRECTORY_SEPARATOR . $name . ".php"; if (!file_exists($fullPath)) { throw new Exception(sprintf("%s 파일이 존재하지 않습니다.", $fullPath)); } $this->setDatas($datas); ob_start(); include $fullPath; return ob_end_flush(); } } //Class