OSDN Git Service

Remove PHP closing tag
[ethna/ethna.git] / skel / skel.action_xmlrpc.php
1 <?php
2 /**
3  *  {$action_path}
4  *
5  *  @author     {$author}
6  *  @package    {$project_id}
7  *  @version    $Id$
8  */
9
10 /**
11  *  {$action_name} Form implementation.
12  *
13  *  @author     {$author}
14  *  @access     public
15  *  @package    {$project_id}
16  */
17 class {$action_form} extends {$project_id}_ActionForm
18 {
19     /**
20      *  @access private
21      *  @var    array   form definition.
22      */
23     var $form = array(
24        /*
25         *  TODO: Write form definition which this action uses.
26         *  @see http://ethna.jp/ethna-document-dev_guide-form.html
27         *
28         *  Example(You can omit all elements except for "type" one) :
29         *
30         *  'sample' => array(
31         *      // Form definition
32         *      'type'        => VAR_TYPE_INT,    // Input type
33         *      'form_type'   => FORM_TYPE_TEXT,  // Form type
34         *      'name'        => 'Sample',        // Display name
35         *  
36         *      //  Validator (executes Validator by written order.)
37         *      'required'    => true,            // Required Option(true/false)
38         *      'min'         => null,            // Minimum value
39         *      'max'         => null,            // Maximum value
40         *      'regexp'      => null,            // String by Regexp
41         *      'mbregexp'    => null,            // Multibype string by Regexp
42         *      'mbregexp_encoding' => 'UTF-8',   // Matching encoding when using mbregexp 
43         *
44         *      //  Filter
45         *      'filter'      => 'sample',        // Optional Input filter to convert input
46         *      'custom'      => null,            // Optional method name which
47         *                                        // is defined in this(parent) class.
48         *  ),
49         */
50     );
51
52     /**
53      *  Form input value convert filter : sample
54      *
55      *  @access protected
56      *  @param  mixed   $value  Form Input Value
57      *  @return mixed           Converted result.
58      */
59     /*
60     function _filter_sample($value)
61     {
62         //  convert to upper case.
63         return strtoupper($value);
64     }
65     */
66 }
67
68 /**
69  *  {$action_name} action implementation.
70  *
71  *  @author     {$author}
72  *  @access     public
73  *  @package    {$project_id}
74  */
75 class {$action_class} extends {$project_id}_ActionClass
76 {
77     /**
78      *  preprocess of {$action_name} Action.
79      *
80      *  @access public
81      *  @return string    forward name(null: success.
82      *                                false: in case you want to exit.)
83      */
84     function prepare()
85     {
86         return null;
87     }
88
89     /**
90      *  {$action_name} action implementation.
91      *
92      *  @access public
93      *  @return string  forward name.
94      */
95     function perform()
96     {
97         return '{$action_name}';
98     }
99 }