HTML_QuickForm
[ class tree: HTML_QuickForm ] [ index: HTML_QuickForm ] [ all elements ]

Source for file image.php

Documentation is available at image.php

  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. // +----------------------------------------------------------------------+
  19. //
  20. // $Id: image.php,v 1.4 2003/06/18 19:36:20 avb Exp $
  21. require_once("HTML/QuickForm/input.php");
  22.  
  23. /**
  24.  * HTML class for a image type element
  25.  * 
  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
  31.  */
  32. {
  33.     // {{{ constructor
  34.  
  35.     /**
  36.      * Class constructor
  37.      * 
  38.      * @param     string    $elementName    (optional)Element name attribute
  39.      * @param     string    $src            (optional)Image source
  40.      * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  41.      *                                       or an associative array
  42.      * @since     1.0
  43.      * @access    public
  44.      * @return    void 
  45.      */
  46.     function HTML_QuickForm_image($elementName=null$src=''$attributes=null)
  47.     {
  48.         HTML_QuickForm_input::HTML_QuickForm_input($elementNamenull$attributes);
  49.         $this->setType('image');
  50.         $this->setSource($src);
  51.     // end class constructor
  52.  
  53.     // }}}
  54.     // {{{ setSource()
  55.  
  56.     /**
  57.      * Sets source for image element
  58.      * 
  59.      * @param     string    $src  source for image element
  60.      * @since     1.0
  61.      * @access    public
  62.      * @return    void 
  63.      */
  64.     function setSource($src)
  65.     {
  66.         $this->updateAttributes(array('src' => $src));
  67.     // end func setSource
  68.  
  69.     // }}}
  70.     // {{{ setBorder()
  71.  
  72.     /**
  73.      * Sets border size for image element
  74.      * 
  75.      * @param     string    $border  border for image element
  76.      * @since     1.0
  77.      * @access    public
  78.      * @return    void 
  79.      */
  80.     function setBorder($border)
  81.     {
  82.         $this->updateAttributes(array('border' => $border));
  83.     // end func setBorder
  84.  
  85.     // }}}
  86.     // {{{ setAlign()
  87.  
  88.     /**
  89.      * Sets alignment for image element
  90.      * 
  91.      * @param     string    $align  alignment for image element
  92.      * @since     1.0
  93.      * @access    public
  94.      * @return    void 
  95.      */
  96.     function setAlign($align)
  97.     {
  98.         $this->updateAttributes(array('align' => $align));
  99.     // end func setAlign
  100.  
  101.     // }}}
  102.     // {{{ freeze()
  103.  
  104.     /**
  105.      * Freeze the element so that only its value is returned
  106.      * 
  107.      * @access    public
  108.      * @return    void 
  109.      */
  110.     function freeze()
  111.     {
  112.         return false;
  113.     //end func freeze
  114.  
  115.     // }}}
  116.  
  117. // end class HTML_QuickForm_image
  118. ?>

Documentation generated on Mon, 11 Mar 2019 14:16:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.