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

Source for file ABSTSourceObject.class.php

Documentation is available at ABSTSourceObject.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_onceCLASSPATH."html/ABSTDimensionObject.class.php" );
  22.  
  23. /**
  24.  * @package html
  25.  *
  26.  * @version   0.1.0
  27.  * @since     0.9.1.5
  28.  * @author    Daniel Plücken <daniel@debakel.net>
  29.  * @license   http://www.gnu.org/copyleft/lesser.html
  30.  *             GNU Lesser General Public License
  31.  * @copyright Copyright (C) 2006 Daniel Plücken <daniel@debakel.net>
  32.  *
  33.  *  This library is free software; you can redistribute it and/or
  34.  *  modify it under the terms of the GNU Lesser General Public
  35.  *  License as published by the Free Software Foundation; either
  36.  *  version 2.1 of the License.
  37.  *
  38.  *  This library is distributed in the hope that it will be useful,
  39.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  40.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  41.  *  GNU Lesser General Public License for more details.
  42.  *
  43.  *  You should have received a copy of the GNU Lesser General
  44.  *  Public License along with this library; if not, write to the
  45.  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  46.  *  Boston, MA 02111-1307 USA
  47.  */
  48. {
  49.   /**
  50.    * The path of the source to the image.
  51.    *
  52.    * @var    string $src 
  53.    * @access public
  54.    */
  55.   var $src = "";
  56.  
  57.  
  58.  
  59.   /**
  60.    * The Constructor let the script die, cause this is an abstract class!
  61.    *
  62.    * @version 1.0
  63.    * @since   0.1.0
  64.    * @author  Daniel Plücken <daniel@debakel.net>
  65.    * @access  public
  66.    * @return  void 
  67.    */
  68.   function ABSTSourceObject()
  69.   {
  70.     die(
  71.          "ABSTSourceObject is an abstract class. "
  72.         ."You cannot create an instance of it."
  73.        );
  74.   }
  75.  
  76.  
  77.  
  78.   /**
  79.    * Sets the source of this image.
  80.    *
  81.    * @version 1.3
  82.    * @since   0.1.0
  83.    * @author  Daniel Plücken <daniel@debakel.net>
  84.    * @access  public
  85.    * @param   string  $string 
  86.    * @param   boolean $validate_path 
  87.    * @return  void 
  88.    */
  89.   function setSRC$string$validate_path true )
  90.   {
  91.      if (
  92.           !$validate_path
  93.        || preg_match(
  94.                          "!^(?:[a-z]+:(?:\\\\|//))?"
  95.                           ."(?:[-._a-z0-9]+[\\\\/])*"
  96.                              ."[-._a-z0-9]+\."
  97.                           ."[-?=&_a-z0-9]+$!i"$string
  98.                     )
  99.         )
  100.         $this->src = $string;
  101.      else
  102.      if !empty$string ) )
  103.      {
  104.         echo "<pre>\r\n";
  105.         echo "<b>The value \"".$string."\" is not a valid URL.<br>"
  106.             ."The value has to be a correct path to a file!</b><br>\r\n";
  107.         $debugArr debug_backtrace();
  108.         print_r$debugArr[count$debugArr )-1);
  109.         echo "</pre>\r\n";
  110.  
  111.         exit();
  112.      }
  113.   }
  114. // End of class ABSTSourceObject
  115. ?>

Documentation generated on Thu, 05 Jun 2008 19:10:01 +0200 by phpDocumentor 1.4.1