Source for file Ethna_Plugin_Generator_EntryPoint.php
Documentation is available at Ethna_Plugin_Generator_EntryPoint.php
// vim: foldmethod=marker
* Ethna_Plugin_Generator_EntryPoint.php
* @author ICHII Takashi <ichii386@schweetheart.jp>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
// {{{ Ethna_Plugin_Generator_EntryPoint
* @author ICHII Takashi <ichii386@schweetheart.jp>
* @param string $skelton スケルトンファイル名
* @param int $gateway ゲートウェイ
* @return true|Ethna_Error true:成功 Ethna_Error:失敗
function &generate($action_name, $skelton =
null, $gateway =
GATEWAY_WWW)
$entity =
sprintf("%s/%s.%s", $this->ctl->getDirectory('www'),
$action_name, $this->ctl->getExt('php'));
$entity =
sprintf("%s/%s.%s", $this->ctl->getDirectory('bin'),
$action_name, $this->ctl->getExt('php'));
'add-entry-point accepts only GATEWAY_WWW or GATEWAY_CLI.');
$skelton =
'skel.entry_www.php';
$skelton =
'skel.entry_cli.php';
printf("file [%s] already exists -> skip\n", $entity);
$macro['project_id'] =
$this->ctl->getAppId();
$macro['action_name'] =
$action_name;
$macro['dir_app'] =
$this->ctl->getDirectory('app');
$user_macro =
$this->_getUserMacro();
$ret =
$this->_generateFile($skelton, $entity, $macro);
printf("action script(s) successfully created [%s]\n", $entity);
printf("[warning] file creation failed [%s]\n", $entity);
return $true; // XXX: error handling
//$ret = Ethna_Util::chmod($entity, 0777);
Documentation generated on Fri, 11 Nov 2011 04:00:13 +0900 by phpDocumentor 1.4.3