예제 #1
0
 /**
  * Build the template file indicated by key into string. Use data in
  * the dictionary as scope
  *
  * @param	string	$key	template file identifier
  * @param	array	$data	used for private scope
  * @return	string
  */
 public function build()
 {
     $data = $this->getAll();
     if ($this->isViewPackage()) {
         $name = $this->getViewPkgName();
         $result = ViewCompositor::composePackage($name, $data);
     } else {
         $file = $this->getFile();
         $result = ViewCompositor::composeFile($file, $data);
     }
     return $result;
 }