Source for file Ethna_Plugin_Generator_View.php
Documentation is available at Ethna_Plugin_Generator_View.php
// vim: foldmethod=marker
* Ethna_Plugin_Generator_View.php
* @author Masaki Fujimoto <fujimoto@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
// {{{ Ethna_Plugin_Generator_View
* @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, $gateway =
GATEWAY_WWW)
$view_dir =
$this->ctl->getViewdir();
$view_class =
$this->ctl->getDefaultViewClass($forward_name, $gateway);
$view_path =
$this->ctl->getDefaultViewPath($forward_name);
$entity =
$view_dir .
$view_path;
$skelton =
'skel.view.php';
$macro['project_id'] =
$this->ctl->getAppId();
$macro['forward_name'] =
$forward_name;
$macro['view_class'] =
$view_class;
$macro['view_path'] =
$view_path;
$user_macro =
$this->_getUserMacro();
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("view script(s) successfully created [%s]\n", $entity);
Documentation generated on Fri, 11 Nov 2011 04:00:19 +0900 by phpDocumentor 1.4.3