Source for file Ethna_Plugin_Generator_Plugin.php
Documentation is available at Ethna_Plugin_Generator_Plugin.php
// vim: foldmethod=marker
* Ethna_Plugin_Generator_Plugin.php
* @author Masaki Fujimoto <fujimoto@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
// {{{ Ethna_Plugin_Generator_Plugin
* @author Masaki Fujimoto <fujimoto@php.net>
* @param string $type プラグインの$type
* @param string $name プラグインの$name
* @param bool $overwrite 上書きオプション
* @return bool true:成功 false:失敗
function generate($type, $name, $overwrite =
false)
$appid =
$this->ctl->getAppId();
$plugin =
& $this->ctl->getPlugin();
list
($class, $plugin_dir, $plugin_path) =
$plugin->getPluginNaming($type, $name, $appid);
$macro['project_id'] =
$appid;
$macro['application_id'] =
$appid;
$user_macro =
$this->_getUserMacro();
if ($this->_generateFile("skel.plugin.{$type}_{$name}.php", "$plugin_dir/$plugin_path", $macro, $overwrite) ==
false) {
printf("[warning] file creation failed [%s]\n", "$plugin_dir/$plugin_path");
printf("plugin script(s) successfully created [%s]\n", "$plugin_dir/$plugin_path");
* @param string $type プラグインの$type
* @param string $name プラグインの$name
* @return bool true:成功 false:失敗
$appid =
$this->ctl->getAppId();
$plugin =
& $this->ctl->getPlugin();
list
($class, $plugin_dir, $plugin_path) =
$plugin->getPluginNaming($type, $name, $appid);
$macro['project_id'] =
$appid;
$user_macro =
$this->_getUserMacro();
unlink("$plugin_dir/$plugin_path");
printf("file [%s] successfully unlinked\n", "$plugin_dir/$plugin_path");
printf("file [%s] not found\n", "$plugin_dir/$plugin_path");
Documentation generated on Fri, 11 Nov 2011 04:00:17 +0900 by phpDocumentor 1.4.3