root/tags/RELEASE_0_9_0B1/patForms/Filter.php

Revision 2, 1.3 kB (checked in by schst, 5 years ago)

initial import on new server

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 /**
3  * patForms filter base class - extend this to create your own filters.
4  *
5  * $Id$
6  *
7  * @package        patForms
8  * @subpackage    Filter
9  */
10
11 /**
12  * patForms filter base class - extend this to create your own filters.
13  *
14  * @package        patForms
15  * @subpackage    Filter
16  * @author        Stephan Schmidt <schst@php-tools.net>
17  * @license        LGPL, see license.txt for details
18  * @link        http://www.php-tools.net
19  */
20 class patForms_Filter
21 {
22    /**
23     * type of the filter
24     *
25     * Possible values are:
26     * - PATFORMS_FILTER_TYPE_HTTP
27     * - PATFORMS_FILTER_TYPE_PHP
28     *
29     * @access    private
30     */
31     var $_type    =    PATFORMS_FILTER_TYPE_PHP;
32
33    /**
34     * get the type of the filter as defined
35     * in the_type property
36     *
37     * @access    public
38     * @return    integer    filter type
39     */
40     function getType()
41     {
42         return $this->_type;
43     }
44     
45    /**
46     * Filter value that is returned by patForms
47     *
48     * This method is applied when patForms_Element::getValue()
49     * or patForms::getValues() is called.
50     *
51     * @abstract
52     * @access    public
53     * @param    string    value
54     * @return    mixed    filtered value
55     */
56     function out( $value )
57     {
58         return $value;
59     }
60
61    /**
62     * Filter value that is passed to patForms
63     *
64     * This method is applied when patForms_Element::setValue()
65     * or patForms::setValues() is called.
66     *
67     * @abstract
68     * @access    public
69     * @param    mixed    value
70     * @return    mixed    filtered value
71     */
72     function in( $value )
73     {
74         return $value;
75     }
76 }
77 ?>
Note: See TracBrowser for help on using the browser.