Source for file PrimitiveIO_strings.classes.php

Documentation is available at PrimitiveIO_strings.classes.php

  1. <?php
  2. /**
  3. * @package polyphony.datamanager_gui
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: PrimitiveIO_strings.classes.php,v 1.10 2007/09/19 14:04:44 adamfranco Exp $
  9. */
  10.  
  11. /**
  12. *
  13. *
  14. * @package polyphony.datamanager_gui
  15. *
  16. * @copyright Copyright &copy; 2005, Middlebury College
  17. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  18. *
  19. * @version $Id: PrimitiveIO_strings.classes.php,v 1.10 2007/09/19 14:04:44 adamfranco Exp $
  20. */
  21. class PrimitiveIO_shortstring extends WTextField {
  22.  
  23. /**
  24. * Sets the value of this Component to the {@link SObject} passed.
  25. * @param ref object $value The {@link SObject} value to use.
  26. *
  27. * @return void
  28. ***/
  29. function setValue($value)
  30. {
  31. ArgumentValidator::validate($value, HasMethodsValidatorRule::getRule("asString"));
  32. parent::setValue($value->asString());
  33. }
  34.  
  35. /**
  36. * Sets the value of this Component to the {@link SObject} passed.
  37. * @param ref object $value The {@link SObject} value to use.
  38. *
  39. * @return void
  40. ***/
  41. function setValueFromSObject($value)
  42. {
  43. $this->setValue($value);
  44. }
  45.  
  46. /**
  47. * Returns the values of wizard-components. Should return an array if children are involved,
  48. * otherwise a whatever type of object is expected.
  49. * @access public
  50. * @return mixed
  51. */
  52. function getAllValues () {
  53. $obj = new String($this->_value?$this->_value:"");
  54. return $obj;
  55. }
  56. }
  57.  
  58. /**
  59. *
  60. * @package polyphony.datamanager_gui
  61. */
  62. class PrimitiveIO_string extends WTextArea {
  63. function PrimitiveIO_string () {
  64. $this->setRows(5);
  65. $this->setColumns(70);
  66. }
  67. /**
  68. * Sets the value of this Component to the {@link SObject} passed.
  69. * @param ref object $value The {@link SObject} value to use.
  70. *
  71. * @return void
  72. ***/
  73. function setValue($value)
  74. {
  75. ArgumentValidator::validate($value, HasMethodsValidatorRule::getRule("asString"));
  76. parent::setValue($value->asString());
  77. }
  78. /**
  79. * Sets the value of this Component to the {@link SObject} passed.
  80. * @param ref object $value The {@link SObject} value to use.
  81. *
  82. * @return void
  83. ***/
  84. function setValueFromSObject($value)
  85. {
  86. $this->setValue($value);
  87. }
  88.  
  89. /**
  90. * Returns the values of wizard-components. Should return an array if children are involved,
  91. * otherwise a whatever type of object is expected.
  92. * @access public
  93. * @return mixed
  94. */
  95. function getAllValues () {
  96. $obj = new String($this->_value?$this->_value:"");
  97. return $obj;
  98. }
  99. }

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