Source for file bbstring.php

Documentation is available at bbstring.php

  1. <?php
  2.  
  3. /**
  4. * String type that can be automatically translated
  5. *
  6. @author     Seth Sims
  7. @copyright  Copyright Seth Sims
  8. @licence    http://opensource.org/licenses/gpl-license.php GNU Public License
  9. @version    $id: bbstring.php,
  10. @package    Bumblebee
  11. @subpackage FormsLibrary
  12. *
  13. *  path (bumblebee root)/inc/formslib/bbstring.php
  14. */
  15.  
  16. require_once 'inc/typeinfo.php';
  17.  
  18. class bbString {
  19.  
  20.     /** holds the internal bb representation of this string */
  21.     var $internal = '';
  22.  
  23.     /** holds the translation of the internal representation */
  24.     var $external = '';
  25.  
  26.     function bbString($string$external ''{
  27.  
  28.         $this->internal = $string;
  29.         $this->external = $external;
  30.  
  31.     //end function constructor
  32.  
  33.     
  34.     /** returns the untranslated version of this string */
  35.     function getInternalRep({
  36.  
  37.         return $this->internal;
  38.  
  39.     //end function getInternalRep
  40.  
  41.     
  42.     /** returns the translated version of this string */
  43.     function getExternalRep({
  44.  
  45.         if($this->external === ''{
  46.  
  47.             return $this->internal;
  48.  
  49.         else {
  50.  
  51.             return $this->external;
  52.  
  53.         //end if-else
  54.  
  55.     //end function getExternalRep
  56.  
  57.     
  58.     function isUTF8({
  59.  
  60.         return isUTF8($this->internal);
  61.  
  62.     }//end function isUTF8
  63.  
  64.     
  65.     function isBlank({
  66.  
  67.         return strlen(trim($this->internal)) == 0;
  68.  
  69.     //end function isBlank
  70.  
  71. //class bbstring
  72. ?>

Documentation generated on Tue, 06 Mar 2007 10:00:40 +0000 by phpDocumentor 1.3.0