From 38f7febaef50545bc024d69b58683bb9765e1cb3 Mon Sep 17 00:00:00 2001 From: fujimoto Date: Fri, 24 Mar 2006 07:15:04 +0000 Subject: [PATCH] =?utf8?q?-=20XMLRPC=E3=82=B2=E3=83=BC=E3=83=88=E3=82=A6?= =?utf8?q?=E3=82=A7=E3=82=A4=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88=E8=BF=BD?= =?utf8?q?=E5=8A=A0(experimental)=20--=20ethna=20add-action-xmlrpc=20[acti?= =?utf8?q?on]=E3=81=A7XMLRPC=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=E5=8F=AF=E8=83=BD=20--=20=E5=BC=95=E6=95=B01?= =?utf8?q?=E3=81=A4=E3=81=A8=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E5=AE=9A?= =?utf8?q?=E7=BE=A91=E3=81=A4=E3=81=8C=E5=AE=9A=E7=BE=A9=E9=A0=86=E3=81=AB?= =?utf8?q?=E5=AF=BE=E5=BF=9C=E3=81=97=E3=81=BE=E3=81=99=20--=20ToDo=20---?= =?utf8?q?=20=E5=87=BA=E5=8A=9B=E3=83=90=E3=83=83=E3=83=95=E3=82=A1?= =?utf8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=20---=20method=20not=20foun?= =?utf8?q?d=E3=81=AA=E3=81=A9=E3=82=A8=E3=83=A9=E3=83=BC=E5=87=A6=E7=90=86?= =?utf8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CHANGES | 7 + class/Ethna_ActionForm.php | 3 - class/Ethna_Controller.php | 176 +++++++++++++++++++++++--- class/Ethna_SkeltonGenerator.php | 26 +++- class/Handle/Ethna_Handle_AddActionXmlrpc.php | 57 +++++++++ class/Handle/Ethna_Handle_Manager.php | 10 ++ skel/app.controller.php | 1 + skel/skel.action_xmlrpc.php | 71 +++++++++++ skel/www.xmlrpc.php | 5 + 9 files changed, 330 insertions(+), 26 deletions(-) create mode 100644 class/Handle/Ethna_Handle_AddActionXmlrpc.php create mode 100644 skel/skel.action_xmlrpc.php create mode 100644 skel/www.xmlrpc.php diff --git a/CHANGES b/CHANGES index 483f833..a410ee8 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ *** features +- XMLRPC¥²¡¼¥È¥¦¥§¥¤¥µ¥Ý¡¼¥ÈÄɲÃ(experimental) +-- ethna add-action-xmlrpc [action]¤ÇXMLRPC¥á¥½¥Ã¥É¤òÄɲòÄǽ +-- °ú¿ô1¤Ä¤È¥Õ¥©¡¼¥àÄêµÁ1¤Ä¤¬ÄêµÁ½ç¤ËÂбþ¤·¤Þ¤¹ +-- ToDo +--- ½ÐÎϥХåե¡¥Á¥§¥Ã¥¯ +--- method not found¤Ê¤É¥¨¥é¡¼½èÍýÂбþ +- Ethna_ActionForm¥¯¥é¥¹¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤ÇsetFormVars()¤ò¼Â¹Ô¤·¤Ê¤¤¤è¤¦¤ËÊѹ¹ - ¥¹¥±¥ë¥È¥ó¤Ë´Þ¤Þ¤ì¤ë'your name'¤ò¥Þ¥¯¥í({$author})¤ËÊѹ¹(~/.ethnaÂбþ) - ¤Ê¤²¤ä¤êÊØÍø´Ø¿ôfile_exists_ex(), is_absolute_path()¤òÄɲà - SimpleTest¤È¤ÎÏ¢·Èµ¡Ç½¤òÄɲÃ(ethna¥³¥Þ¥ó¥É¤Ëadd-action-test,add-view-test¤ÎÄɲäʤÉ) diff --git a/class/Ethna_ActionForm.php b/class/Ethna_ActionForm.php index 94c8015..c9687bb 100644 --- a/class/Ethna_ActionForm.php +++ b/class/Ethna_ActionForm.php @@ -89,9 +89,6 @@ class Ethna_ActionForm // ¥Õ¥©¡¼¥àÃÍÄêµÁ¤ÎÀßÄê $this->_setFormDef(); - - // ¥Õ¥©¡¼¥àÃͤÎÀßÄê - $this->setFormVars(); } /** diff --git a/class/Ethna_Controller.php b/class/Ethna_Controller.php index af8cb71..69b9ed5 100644 --- a/class/Ethna_Controller.php +++ b/class/Ethna_Controller.php @@ -13,6 +13,8 @@ /** * ¥³¥ó¥È¥í¡¼¥é¥¯¥é¥¹ * + * @todo gateway¤Çswitch¤·¤Æ¤ë¤È¤³¤í¤¬¥À¥µ¥À¥µ + * * @author Masaki Fujimoto * @access public * @package Ethna @@ -38,6 +40,7 @@ class Ethna_Controller /** @var array ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥Ç¥£¥ì¥¯¥È¥ê */ var $directory = array( 'action' => 'app/action', + 'action_xmlrpc' => 'app/action_xmlrpc', 'app' => 'app', 'etc' => 'etc', 'filter' => 'app/filter', @@ -92,12 +95,18 @@ class Ethna_Controller /** @var string ¸½ºß¼Â¹ÔÃæ¤Î¥¢¥¯¥·¥ç¥ó̾ */ var $action_name; + /** @var string ¸½ºß¼Â¹ÔÃæ¤ÎXMLRPC¥á¥½¥Ã¥É̾ */ + var $xmlrpc_method_name; + /** @var array forwardÄêµÁ */ var $forward = array(); /** @var array actionÄêµÁ */ var $action = array(); + /** @var array action(XMLRPC)ÄêµÁ */ + var $action_xmlrpc = array(); + /** @var array ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥Þ¥Í¡¼¥¸¥ãÄêµÁ */ var $manager = array(); @@ -335,9 +344,20 @@ class Ethna_Controller * @access public * @return string ¥¢¥¯¥·¥ç¥ó¥Ç¥£¥ì¥¯¥È¥ê */ - function getActiondir() + function getActiondir($gateway = null) { - return (empty($this->directory['action']) ? ($this->base . (empty($this->base) ? '' : '/')) : ($this->directory['action'] . "/")); + $key = 'action'; + $gateway = is_null($gateway) ? $this->getGateway() : $gateway; + switch ($gateway) { + case GATEWAY_WWW: + case GATEWAY_CLI: + $key = 'action'; + break; + case GATEWAY_XMLRPC: + $key = 'action_xmlrpc'; + } + + return (empty($this->directory[$key]) ? ($this->base . (empty($this->base) ? '' : '/')) : ($this->directory[$key] . "/")); } /** @@ -509,6 +529,17 @@ class Ethna_Controller } /** + * ¼Â¹ÔÃæ¤ÎXMLRPC¥á¥½¥Ã¥É̾¤òÊÖ¤¹ + * + * @access public + * @return string ¼Â¹ÔÃæ¤ÎXMLRPC¥á¥½¥Ã¥É̾ + */ + function getXmlrpcMethodName() + { + return $this->xmlrpc_method_name; + } + + /** * »ÈÍѸÀ¸ì¤ò¼èÆÀ¤¹¤ë * * @access public @@ -576,16 +607,19 @@ class Ethna_Controller * XMLRPC¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¨¥ó¥È¥ê¥Ý¥¤¥ó¥È * * @access public - * @param string $class_name ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥³¥ó¥È¥í¡¼¥é¤Î¥¯¥é¥¹Ì¾ - * @param mixed $action_name »ØÄê¤Î¥¢¥¯¥·¥ç¥ó̾(¾Êά²Ä) - * @param mixed $fallback_action_name ¥¢¥¯¥·¥ç¥ó¤¬·èÄê¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¼Â¹Ô¤µ¤ì¤ë¥¢¥¯¥·¥ç¥ó̾(¾Êά²Ä) * @static */ - function main_XMLRPC($class_name, $action_name = "", $fallback_action_name = "") + function main_XMLRPC($class_name) { + if (extension_loaded('xmlrpc') == false) { + die("xmlrpc extension is required to enable this gateway"); + } else if (ini_get('always_populate_raw_post_data') == false) { + die("always_populate_raw_post_data ini variable should be true to enable this gateway"); + } + $c =& new $class_name; $c->setGateway(GATEWAY_XMLRPC); - $c->trigger($action_name, $fallback_action_name); + $c->trigger("", "", false); } /** @@ -700,6 +734,7 @@ class Ethna_Controller // ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À® $form_name = $this->getActionFormName($action_name); $this->action_form =& new $form_name($this); + $this->action_form->setFormVars(); // ¥Ð¥Ã¥¯¥¨¥ó¥É½èÍý¼Â¹Ô $backend =& $this->getBackend(); @@ -756,7 +791,56 @@ class Ethna_Controller */ function _trigger_XMLRPC($action_name = "") { - die("sorry, xmlrpc gateway is not supported yet"); + $xmlrpc_gateway_method_name = "_Ethna_XmlrpcGateway"; + + $xmlrpc_server = xmlrpc_server_create(); + $method = null; + $param = xmlrpc_decode_request($GLOBALS['HTTP_RAW_POST_DATA'], $method); + $this->xmlrpc_method_name = $method; + + $request = xmlrpc_encode_request($xmlrpc_gateway_method_name, $param, array("output_type" => "xml", "verbosity" => "pretty", "escaping" => array('markup'), "version" => "xmlrpc", "encoding" => "utf-8")); + xmlrpc_server_register_method($xmlrpc_server, $xmlrpc_gateway_method_name, $xmlrpc_gateway_method_name); + $r = xmlrpc_server_call_method($xmlrpc_server, $request, null, array("output_type" => "xml", "verbosity" => "pretty", "escaping" => array('markup'), "version" => "xmlrpc", "encoding" => "utf-8")); + + header('Content-Length: ' . strlen($r)); + header('Content-Type: text/xml; charset=UTF-8'); + print $r; + } + + /** + * _trigger_XMLRPC¤Î¥³¡¼¥ë¥Ð¥Ã¥¯¥á¥½¥Ã¥É + * + * @access public + */ + function trigger_XMLRPC($method, $param) + { + // ¥¢¥¯¥·¥ç¥óÄêµÁ¤Î¼èÆÀ + $action_obj =& $this->_getAction($method); + if (is_null($action_obj)) { + return Ethna::raiseError("undefined xmlrpc method [%s]", E_APP_UNDEFINED_ACTION, $method); + } + + // ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À® + $form_name = $this->getActionFormName($method); + $this->action_form =& new $form_name($this); + $def = $this->action_form->getDef(); + $n = 0; + foreach ($def as $key => $value) { + if (isset($param[$n]) == false) { + $this->action_form->set($key, null); + } else { + $this->action_form->set($key, $param[$n]); + } + $n++; + } + + // ¥Ð¥Ã¥¯¥¨¥ó¥É½èÍý¼Â¹Ô + $backend =& $this->getBackend(); + $session =& $this->getSession(); + $session->restore(); + $r = $backend->perform($method); + + return $r; } /** @@ -921,9 +1005,19 @@ class Ethna_Controller * @param string $action_name ¥¢¥¯¥·¥ç¥ó̾ * @return array ¥¢¥¯¥·¥ç¥óÄêµÁ */ - function &_getAction($action_name) + function &_getAction($action_name, $gateway = null) { - $action =& $this->action; + $action = array(); + $gateway = is_null($gateway) ? $this->getGateway() : $gateway; + switch ($gateway) { + case GATEWAY_WWW: + case GATEWAY_CLI: + $action =& $this->action; + break; + case GATEWAY_XMLRPC: + $action =& $this->action_xmlrpc; + break; + } $action_obj = array(); if (isset($action[$action_name])) { @@ -936,7 +1030,7 @@ class Ethna_Controller } // ¥¢¥¯¥·¥ç¥ó¥¹¥¯¥ê¥×¥È¤Î¥¤¥ó¥¯¥ë¡¼¥É - $this->_includeActionScript($action_obj, $action_name); + $this->_includeActionScript($action_obj, $action_name, $gateway); // ¾ÊάÃͤÎÊäÀµ if (isset($action_obj['class_name']) == false) { @@ -1048,10 +1142,12 @@ class Ethna_Controller * @param string $action_name ¥¢¥¯¥·¥ç¥ó̾ * @return string ¥¢¥¯¥·¥ç¥ó¥Õ¥©¡¼¥à̾ */ - function getDefaultFormClass($action_name) + function getDefaultFormClass($action_name, $gateway = null) { + $gateway_prefix = $this->_getGatewayPrefix($gateway); + $postfix = preg_replace('/_(.)/e', "strtoupper('\$1')", ucfirst($action_name)); - $r = sprintf("%s_Form_%s", $this->getAppId(), $postfix); + $r = sprintf("%s_%sForm_%s", $this->getAppId(), $gateway_prefix ? $gateway_prefix . "_" : "", $postfix); $this->logger->log(LOG_DEBUG, "default action class [%s]", $r); return $r; @@ -1123,10 +1219,12 @@ class Ethna_Controller * @param string $action_name ¥¢¥¯¥·¥ç¥ó̾ * @return string ¥¢¥¯¥·¥ç¥ó¥¯¥é¥¹Ì¾ */ - function getDefaultActionClass($action_name) + function getDefaultActionClass($action_name, $gateway = null) { + $gateway_prefix = $this->_getGatewayPrefix($gateway); + $postfix = preg_replace('/_(.)/e', "strtoupper('\$1')", ucfirst($action_name)); - $r = sprintf("%s_Action_%s", $this->getAppId(), $postfix); + $r = sprintf("%s_%sAction_%s", $this->getAppId(), $gateway_prefix ? $gateway_prefix . "_" : "", $postfix); $this->logger->log(LOG_DEBUG, "default action class [%s]", $r); return $r; @@ -1229,10 +1327,12 @@ class Ethna_Controller * @param string $forward_name forward̾ * @return string view class¥¯¥é¥¹Ì¾ */ - function getDefaultViewClass($forward_name) + function getDefaultViewClass($forward_name, $gateway = null) { + $gateway_prefix = $this->_getGatewayPrefix($gateway); + $postfix = preg_replace('/_(.)/e', "strtoupper('\$1')", ucfirst($forward_name)); - $r = sprintf("%s_View_%s", $this->getAppId(), $postfix); + $r = sprintf("%s_%sView_%s", $this->getAppId(), $gateway_prefix ? $gateway_prefix . "_" : "", $postfix); $this->logger->log(LOG_DEBUG, "default view class [%s]", $r); return $r; @@ -1446,6 +1546,31 @@ class Ethna_Controller } /** + * ¥²¡¼¥È¥¦¥§¥¤¤ËÂбþ¤·¤¿¥¯¥é¥¹Ì¾¤Î¥×¥ì¥Õ¥£¥¯¥¹¤ò¼èÆÀ¤¹¤ë + * + * @access public + * @param string $gateway ¥²¡¼¥È¥¦¥§¥¤ + * @return string ¥²¡¼¥È¥¦¥§¥¤¥¯¥é¥¹¥×¥ì¥Õ¥£¥¯¥¹ + */ + function _getGatewayPrefix($gateway = null) + { + $gateway = is_null($gateway) ? $this->getGateway() : $gateway; + switch ($gateway) { + case GATEWAY_WWW: + case GATEWAY_CLI: + $prefix = ''; + break; + case GATEWAY_XMLRPC: + $prefix = 'Xmlrpc'; + break; + default: + $prefix = ''; + } + + return $prefix; + } + + /** * ¥Þ¥Í¡¼¥¸¥ã¥¯¥é¥¹Ì¾¤ò¼èÆÀ¤¹¤ë * * @access public @@ -1736,4 +1861,21 @@ class Ethna_Controller } } // }}} + +/** + * XMLRPC¥²¡¼¥È¥¦¥§¥¤¤Î¥¹¥¿¥Ö¥¯¥é¥¹ + * + * @access public + */ +function _Ethna_XmlrpcGateway($method_stub, $param) +{ + $ctl =& Ethna_Controller::getInstance(); + $method = $ctl->getXmlrpcMethodName(); + $r = $ctl->trigger_XMLRPC($method, $param); + if (Ethna::isError($r)) { + // ToDo: notify fault + return -1; + } + return $r; +} ?> diff --git a/class/Ethna_SkeltonGenerator.php b/class/Ethna_SkeltonGenerator.php index d4457a3..f39d0ff 100644 --- a/class/Ethna_SkeltonGenerator.php +++ b/class/Ethna_SkeltonGenerator.php @@ -32,6 +32,7 @@ class Ethna_SkeltonGenerator $dir_list = array( array("app", 0755), array("app/action", 0755), + array("app/action_xmlrpc", 0755), array("app/filter", 0755), array("app/view", 0755), array("bin", 0755), @@ -103,8 +104,10 @@ class Ethna_SkeltonGenerator $macro['view_name'] = '{$view_name}'; $macro['view_path'] = '{$view_path}'; + // the longest if? :) if ($this->_generateFile("www.index.php", "$basedir/www/index.php", $macro) == false || $this->_generateFile("www.info.php", "$basedir/www/info.php", $macro) == false || + $this->_generateFile("www.xmlrpc.php", "$basedir/www/xmlrpc.php", $macro) == false || $this->_generateFile("dot.ethna", "$basedir/.ethna", $macro) == false || $this->_generateFile("app.controller.php", sprintf("$basedir/app/%s_Controller.php", $macro['project_id']), $macro) == false || $this->_generateFile("app.error.php", sprintf("$basedir/app/%s_Error.php", $macro['project_id']), $macro) == false || @@ -133,9 +136,10 @@ class Ethna_SkeltonGenerator * @access public * @param string $action_name ¥¢¥¯¥·¥ç¥ó̾ * @param string $app_dir ¥×¥í¥¸¥§¥¯¥È¥Ç¥£¥ì¥¯¥È¥ê + * @param int $gateway ¥²¡¼¥È¥¦¥§¥¤ * @return bool true:À®¸ù false:¼ºÇÔ */ - function generateActionSkelton($action_name, $app_dir) + function generateActionSkelton($action_name, $app_dir, $gateway = GATEWAY_WWW) { // discover controller $controller_class = $this->_discoverController($app_dir); @@ -146,10 +150,10 @@ class Ethna_SkeltonGenerator $c =& new $controller_class; $c->setGateway(GATEWAY_CLI); - $action_dir = $c->getActiondir(); - $action_class = $c->getDefaultActionClass($action_name, false); - $action_form = $c->getDefaultFormClass($action_name, false); - $action_path = $c->getDefaultActionPath($action_name, false); + $action_dir = $c->getActiondir($gateway); + $action_class = $c->getDefaultActionClass($action_name, $gateway); + $action_form = $c->getDefaultFormClass($action_name, $gateway); + $action_path = $c->getDefaultActionPath($action_name); $macro = array(); $macro['project_id'] = $c->getAppId(); @@ -163,9 +167,19 @@ class Ethna_SkeltonGenerator $this->_mkdir(dirname("$action_dir$action_path"), 0755); + switch ($gateway) { + case GATEWAY_WWW: + case GATEWAY_CLI: + $skelton = "skel.action.php"; + break; + case GATEWAY_XMLRPC: + $skelton = "skel.action_xmlrpc.php"; + break; + } + if (file_exists("$action_dir$action_path")) { printf("file [%s] already exists -> skip\n", "$action_dir$action_path"); - } else if ($this->_generateFile("skel.action.php", "$action_dir$action_path", $macro) == false) { + } else if ($this->_generateFile($skelton, "$action_dir$action_path", $macro) == false) { printf("[warning] file creation failed [%s]\n", "$action_dir$action_path"); } else { printf("action script(s) successfully created [%s]\n", "$action_dir$action_path"); diff --git a/class/Handle/Ethna_Handle_AddActionXmlrpc.php b/class/Handle/Ethna_Handle_AddActionXmlrpc.php new file mode 100644 index 0000000..d0300ed --- /dev/null +++ b/class/Handle/Ethna_Handle_AddActionXmlrpc.php @@ -0,0 +1,57 @@ + + * @license http://www.opensource.org/licenses/bsd-license.php The BSD License + * @package Ethna + * @version $Id$ + */ +include_once(ETHNA_BASE . '/class/Handle/Ethna_Handle_AddAction.php'); + +// {{{ Ethna_Handle_AddActionXmlrpc +/** + * add-action handler + * + * @author Masaki Fujimoto + * @access public + * @package Ethna + */ +class Ethna_Handle_AddActionXmlrpc extends Ethna_Handle_AddAction +{ + /** + * get handler's description + * + * @access public + */ + function getDescription() + { + return "add new xmlrpc action to project:\n {$this->id} [action] ([project-base-dir])\n"; + } + + /** + * add action + * + * @access public + */ + function perform() + { + $r = $this->_validateArgList(); + if (Ethna::isError($r)) { + return $r; + } + list($action_name, $app_dir) = $r; + + $sg =& new Ethna_SkeltonGenerator(); + $r = $sg->generateActionSkelton($action_name, $app_dir, GATEWAY_XMLRPC); + if (Ethna::isError($r)) { + printf("error occurred while generating skelton. please see also following error message(s)\n\n"); + return $r; + } + + return true; + } +} +// }}} +?> diff --git a/class/Handle/Ethna_Handle_Manager.php b/class/Handle/Ethna_Handle_Manager.php index 6ef5998..dc63d30 100644 --- a/class/Handle/Ethna_Handle_Manager.php +++ b/class/Handle/Ethna_Handle_Manager.php @@ -83,6 +83,8 @@ class Ethna_Handle_Manager } closedir($dh); + usort($handler_list, array($this, "_handler_sort_callback")); + return $handler_list; } @@ -138,6 +140,14 @@ class Ethna_Handle_Manager $id = preg_replace('/\-(.)/e', "strtoupper('\$1')", ucfirst($id)); return sprintf("Ethna_Handle_%s", $id); } + + /** + * sort callback method + */ + function _handler_sort_callback($a, $b) + { + return strcmp($a->getId(), $b->getId()); + } } // }}} ?> diff --git a/skel/app.controller.php b/skel/app.controller.php index c822b5d..f185945 100644 --- a/skel/app.controller.php +++ b/skel/app.controller.php @@ -84,6 +84,7 @@ class {$project_id}_Controller extends Ethna_Controller */ var $directory = array( 'action' => 'app/action', + 'action_xmlrpc' => 'app/action_xmlrpc', 'app' => 'app', 'etc' => 'etc', 'filter' => 'app/filter', diff --git a/skel/skel.action_xmlrpc.php b/skel/skel.action_xmlrpc.php new file mode 100644 index 0000000..b09f2e1 --- /dev/null +++ b/skel/skel.action_xmlrpc.php @@ -0,0 +1,71 @@ + array( + 'name' => '¥µ¥ó¥×¥ë', // ɽ¼¨Ì¾ + 'required' => true, // ɬ¿Ü¥ª¥×¥·¥ç¥ó(true/false) + 'min' => null, // ºÇ¾®ÃÍ + 'max' => null, // ºÇÂçÃÍ + 'regexp' => null, // ʸ»ú¼ï»ØÄê(Àµµ¬É½¸½) + 'custom' => null, // ¥á¥½¥Ã¥É¤Ë¤è¤ë¥Á¥§¥Ã¥¯ + 'filter' => null, // ÆþÎÏÃÍÊÑ´¹¥Õ¥£¥ë¥¿¥ª¥×¥·¥ç¥ó + 'form_type' => FORM_TYPE_TEXT, // ¥Õ¥©¡¼¥à·¿ + 'type' => VAR_TYPE_INT, // ÆþÎÏÃÍ·¿ + ), + */ + ); +} + +/** + * {$action_name}¥¢¥¯¥·¥ç¥ó¤Î¼ÂÁõ + * + * @author {$author} + * @access public + * @package {$project_id} + */ +class {$action_class} extends Ethna_ActionClass +{ + /** + * {$action_name}¥¢¥¯¥·¥ç¥ó¤ÎÁ°½èÍý + * + * @access public + * @return string Á«°Ü̾(Àµ¾ï½ªÎ»¤Ê¤énull, ½èÍý½ªÎ»¤Ê¤éfalse) + */ + function prepare() + { + return null; + } + + /** + * {$action_name}¥¢¥¯¥·¥ç¥ó¤Î¼ÂÁõ + * + * @access public + * @return string Á«°Ü̾ + */ + function perform() + { + return '{$action_name}'; + } +} +?> diff --git a/skel/www.xmlrpc.php b/skel/www.xmlrpc.php new file mode 100644 index 0000000..890db96 --- /dev/null +++ b/skel/www.xmlrpc.php @@ -0,0 +1,5 @@ + -- 2.11.0