adding some strings
[moodle-linuxchix.git] / lib / pear / HTML / QuickForm / image.php
bloba3cc2e37c2c10c9d48745e5ab7943fd7547b5434
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4: */
3 // +----------------------------------------------------------------------+
4 // | PHP version 4.0 |
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.0 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Authors: Adam Daniel <adaniel1@eesus.jnj.com> |
17 // | Bertrand Mansion <bmansion@mamasam.com> |
18 // +----------------------------------------------------------------------+
20 // $Id$
21 require_once("HTML/QuickForm/input.php");
23 /**
24 * HTML class for a image type element
26 * @author Adam Daniel <adaniel1@eesus.jnj.com>
27 * @author Bertrand Mansion <bmansion@mamasam.com>
28 * @version 1.0
29 * @since PHP4.04pl1
30 * @access public
32 class HTML_QuickForm_image extends HTML_QuickForm_input
34 // {{{ constructor
36 /**
37 * Class constructor
39 * @param string $elementName (optional)Element name attribute
40 * @param string $src (optional)Image source
41 * @param mixed $attributes (optional)Either a typical HTML attribute string
42 * or an associative array
43 * @since 1.0
44 * @access public
45 * @return void
47 function HTML_QuickForm_image($elementName=null, $src='', $attributes=null)
49 HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
50 $this->setType('image');
51 $this->setSource($src);
52 } // end class constructor
54 // }}}
55 // {{{ setSource()
57 /**
58 * Sets source for image element
60 * @param string $src source for image element
61 * @since 1.0
62 * @access public
63 * @return void
65 function setSource($src)
67 $this->updateAttributes(array('src' => $src));
68 } // end func setSource
70 // }}}
71 // {{{ setBorder()
73 /**
74 * Sets border size for image element
76 * @param string $border border for image element
77 * @since 1.0
78 * @access public
79 * @return void
81 function setBorder($border)
83 $this->updateAttributes(array('border' => $border));
84 } // end func setBorder
86 // }}}
87 // {{{ setAlign()
89 /**
90 * Sets alignment for image element
92 * @param string $align alignment for image element
93 * @since 1.0
94 * @access public
95 * @return void
97 function setAlign($align)
99 $this->updateAttributes(array('align' => $align));
100 } // end func setAlign
102 // }}}
103 // {{{ freeze()
106 * Freeze the element so that only its value is returned
108 * @access public
109 * @return void
111 function freeze()
113 return false;
114 } //end func freeze
116 // }}}
118 } // end class HTML_QuickForm_image