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

Source for file ABSTDimensionObject.class.php

Documentation is available at ABSTDimensionObject.class.php

  1. <?php
  2. /**
  3.  * For including this file you have to define the constant "CLASSPATH".
  4.  * Because every include in the framework depends on the CLASSPATH definition.
  5.  * The CLASSPATH means the relative path to the folder that contains the
  6.  * framework GilliGan.
  7.  *
  8.  * @package html
  9.  */
  10.  
  11. if!defined"CLASSPATH" ) )
  12. {
  13.   echo "<h3>You have to define the constant CLASSPATH!</h3>\n";
  14.   echo "Example: define( 'CLASSPATH', '../path/to/classes/' );\n";
  15.   exit();
  16. }
  17.  
  18. /**
  19.  * Including the basic class of all HTML-tags.
  20.  */
  21. require_once CLASSPATH."html/ABSTHTMLTag.class.php";
  22.  
  23. /**
  24.  * Constants of regular expression.
  25.  */
  26. require_once CLASSPATH."RegExpConstants.inc.php";
  27.  
  28. /**
  29.  * @package html
  30.  *
  31.  * @version   0.1.0
  32.  * @since     0.9.1.5
  33.  * @author    Daniel Plücken <daniel@debakel.net>
  34.  * @license   http://www.gnu.org/copyleft/lesser.html
  35.  *             GNU Lesser General Public License
  36.  * @copyright Copyright (C) 2006 Daniel Plücken <daniel@debakel.net>
  37.  *
  38.  *  This library is free software; you can redistribute it and/or
  39.  *  modify it under the terms of the GNU Lesser General Public
  40.  *  License as published by the Free Software Foundation; either
  41.  *  version 2.1 of the License.
  42.  *
  43.  *  This library is distributed in the hope that it will be useful,
  44.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  45.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  46.  *  GNU Lesser General Public License for more details.
  47.  *
  48.  *  You should have received a copy of the GNU Lesser General
  49.  *  Public License along with this library; if not, write to the
  50.  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  51.  *  Boston, MA 02111-1307 USA
  52.  */
  53. {
  54.    /**
  55.     * Stores the value of the width-attribute of this dimension Object.
  56.     *
  57.     * @var   integer $width 
  58.     *  access public
  59.     */
  60.    var $width;
  61.    /**
  62.     * Stores the value of the height-attribute of this image.
  63.     *
  64.     * @var   integer $height 
  65.     *  access public
  66.     */
  67.    var $height;
  68.  
  69.  
  70.  
  71.    /**
  72.     * The Constructor let the script die, cause this is an abstract class!
  73.     *
  74.     * @version 1.0
  75.     * @since   0.1.0
  76.     * @author  Daniel Plücken <daniel@debakel.net>
  77.     * @access  public
  78.     * @return  void 
  79.     */
  80.    function ABSTDimensionObject()
  81.    {
  82.       die(
  83.            "ABSTDimensionObject is an abstract class. "
  84.           ."You cannot create an instance of it."
  85.          );
  86.    }
  87.  
  88.  
  89.  
  90.    /**
  91.     * Sets the width-attribute of this object.
  92.     *
  93.     * @version 1.1
  94.     * @since   0.1.0
  95.     * @author  Daniel Plücken <daniel@debakel.net>
  96.     * @access  public
  97.     * @param   integer $int 
  98.     * @return  void 
  99.     */
  100.    function setWidth$int )
  101.    {
  102.      ifempty$int ) )
  103.        $int 0;
  104.      
  105.      ifpreg_match"!^".UNSIGNEDINTEGER."%?$!"$int ) )
  106.        $this->width = $int;
  107.      else
  108.      if!empty$int ) )
  109.        die(
  110.             "The value \"".$int."\" is not valid value for a width.<br>"
  111.            ."The value has to be a number!"
  112.           );
  113.    }
  114.  
  115.  
  116.  
  117.    /**
  118.     * Sets the height-attribute of this object.
  119.     *
  120.     * @version 1.1
  121.     * @since   0.1.0
  122.     * @author  Daniel Plücken <daniel@debakel.net>
  123.     * @access  public
  124.     * @param   integer $int 
  125.     * @return  void 
  126.     */
  127.    function setHeight$int )
  128.    {
  129.      ifempty$int ) )
  130.        $int 0;
  131.      
  132.      ifpreg_match"!^".UNSIGNEDINTEGER."%?$!"$int ) )
  133.        $this->height = $int;
  134.      else
  135.        die(
  136.             "The value \"".$int."\" is not valid value for a height.<br>"
  137.            ."The value has to be a number!"
  138.           );
  139.    }
  140. // End of class ABSTDimensionObject
  141. ?>

Documentation generated on Thu, 05 Jun 2008 19:09:44 +0200 by phpDocumentor 1.4.1