root/events/phpframework/ethna/trunk/app/action/Friends.php @ 13392

Revision 13392, 2.8 kB (checked in by maru_cc, 5 years ago)

add-action & add-view -t

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