home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / HTML / QuickForm / image.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  3.5 KB  |  128 lines

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3.  
  4. /**
  5.  * HTML class for an <input type="image" /> element
  6.  * 
  7.  * PHP versions 4 and 5
  8.  *
  9.  * LICENSE: This source file is subject to version 3.01 of the PHP license
  10.  * that is available through the world-wide-web at the following URI:
  11.  * http://www.php.net/license/3_01.txt If you did not receive a copy of
  12.  * the PHP License and are unable to obtain it through the web, please
  13.  * send a note to license@php.net so we can mail you a copy immediately.
  14.  *
  15.  * @category    HTML
  16.  * @package     HTML_QuickForm
  17.  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
  18.  * @author      Bertrand Mansion <bmansion@mamasam.com>
  19.  * @copyright   2001-2007 The PHP Group
  20.  * @license     http://www.php.net/license/3_01.txt PHP License 3.01
  21.  * @version     CVS: $Id: image.php,v 1.5 2007/05/29 18:34:36 avb Exp $
  22.  * @link        http://pear.php.net/package/HTML_QuickForm
  23.  */
  24.  
  25. /**
  26.  * Base class for <input /> form elements
  27.  */
  28. require_once 'HTML/QuickForm/input.php';
  29.  
  30. /**
  31.  * HTML class for an <input type="image" /> element
  32.  * 
  33.  * @category    HTML
  34.  * @package     HTML_QuickForm
  35.  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
  36.  * @author      Bertrand Mansion <bmansion@mamasam.com>
  37.  * @version     Release: 3.2.10
  38.  * @since       1.0
  39.  */
  40. class HTML_QuickForm_image extends HTML_QuickForm_input
  41. {
  42.     // {{{ constructor
  43.  
  44.     /**
  45.      * Class constructor
  46.      * 
  47.      * @param     string    $elementName    (optional)Element name attribute
  48.      * @param     string    $src            (optional)Image source
  49.      * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
  50.      *                                      or an associative array
  51.      * @since     1.0
  52.      * @access    public
  53.      * @return    void
  54.      */
  55.     function HTML_QuickForm_image($elementName=null, $src='', $attributes=null)
  56.     {
  57.         HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
  58.         $this->setType('image');
  59.         $this->setSource($src);
  60.     } // end class constructor
  61.  
  62.     // }}}
  63.     // {{{ setSource()
  64.  
  65.     /**
  66.      * Sets source for image element
  67.      * 
  68.      * @param     string    $src  source for image element
  69.      * @since     1.0
  70.      * @access    public
  71.      * @return    void
  72.      */
  73.     function setSource($src)
  74.     {
  75.         $this->updateAttributes(array('src' => $src));
  76.     } // end func setSource
  77.  
  78.     // }}}
  79.     // {{{ setBorder()
  80.  
  81.     /**
  82.      * Sets border size for image element
  83.      * 
  84.      * @param     string    $border  border for image element
  85.      * @since     1.0
  86.      * @access    public
  87.      * @return    void
  88.      */
  89.     function setBorder($border)
  90.     {
  91.         $this->updateAttributes(array('border' => $border));
  92.     } // end func setBorder
  93.  
  94.     // }}}
  95.     // {{{ setAlign()
  96.  
  97.     /**
  98.      * Sets alignment for image element
  99.      * 
  100.      * @param     string    $align  alignment for image element
  101.      * @since     1.0
  102.      * @access    public
  103.      * @return    void
  104.      */
  105.     function setAlign($align)
  106.     {
  107.         $this->updateAttributes(array('align' => $align));
  108.     } // end func setAlign
  109.  
  110.     // }}}
  111.     // {{{ freeze()
  112.  
  113.     /**
  114.      * Freeze the element so that only its value is returned
  115.      * 
  116.      * @access    public
  117.      * @return    void
  118.      */
  119.     function freeze()
  120.     {
  121.         return false;
  122.     } //end func freeze
  123.  
  124.     // }}}
  125.  
  126. } // end class HTML_QuickForm_image
  127. ?>
  128.