Source for file Blob.class.php

Documentation is available at Blob.class.php

  1. <?php
  2.  
  3. /**
  4. * A simple Blob data type.
  5. *
  6. * @package harmoni.primitives.collections-text
  7. *
  8. * @copyright Copyright &copy; 2005, Middlebury College
  9. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  10. *
  11. * @version $Id: Blob.class.php,v 1.8 2007/09/04 20:25:26 adamfranco Exp $
  12. */
  13. class Blob
  14. extends String
  15. {
  16.  
  17. function Blob($string="") {
  18. $this->_string = $string;
  19. }
  20. /**
  21. * Instantiates a new Blob object with the passed value.
  22. * @param string $value
  23. * @return ref object
  24. * @access public
  25. * @static
  26. */
  27. function withValue($value) {
  28. $string = new Blob($value);
  29. return $string;
  30. }
  31.  
  32. /**
  33. * Instantiates a new Blob object with the passed value.
  34. *
  35. * allowing 'fromString' instantiation
  36. * @param string $aString
  37. * @return ref object
  38. * @access public
  39. * @static
  40. */
  41. function fromString($aString) {
  42. $string = new Blob($aString);
  43. return $string;
  44. }
  45.  
  46. function value() {
  47. return $this->_string;
  48. }
  49. }

Documentation generated on Wed, 19 Sep 2007 10:21:46 -0400 by phpDocumentor 1.3.0RC3