Source for file Ethna_Plugin_Generator_Template.php
Documentation is available at Ethna_Plugin_Generator_Template.php
// vim: foldmethod=marker
* Ethna_Plugin_Generator_Template.php
* @author Masaki Fujimoto <fujimoto@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
* @version $Id: Ethna_Plugin_Generator_Template.php 411 2006-11-17 02:32:32Z ichii386 $
// {{{ Ethna_Plugin_Generator_Template
* @author Masaki Fujimoto <fujimoto@php.net>
* @param string $forward_name テンプレート名
* @param string $skelton スケルトンファイル名
* @return true|Ethna_Error true:成功 Ethna_Error:失敗
function &generate($forward_name, $skelton =
null)
$tpl_dir =
$this->ctl->getTemplatedir();
if ($tpl_dir{strlen($tpl_dir)-
1} !=
'/') {
$tpl_path =
$this->ctl->getDefaultForwardPath($forward_name);
$entity =
$tpl_dir .
$tpl_path;
$skelton =
'skel.template.tpl';
// add '_' for tpl and no user macro for tpl
$macro['_project_id'] =
$this->ctl->getAppId();
printf("file [%s] already exists -> skip\n", $entity);
} else if ($this->_generateFile($skelton, $entity, $macro) ==
false) {
printf("[warning] file creation failed [%s]\n", $entity);
printf("template file(s) successfully created [%s]\n", $entity);
Documentation generated on Thu, 08 May 2008 00:15:10 +0900 by phpDocumentor 1.4.2