soapval

For creating serializable abstractions of native PHP types.

Defined (2)

The class is defined in the following location(s).

/lib/class.soap_val.php  
  1. class soapval extends nusoap_base { 
  2. /** 
  3. * The XML element name 
  4. * @var string 
  5. * @access private 
  6. */ 
  7. var $name; 
  8. /** 
  9. * The XML type name (string or false) 
  10. * @var mixed 
  11. * @access private 
  12. */ 
  13. var $type; 
  14. /** 
  15. * The PHP value 
  16. * @var mixed 
  17. * @access private 
  18. */ 
  19. var $value; 
  20. /** 
  21. * The XML element namespace (string or false) 
  22. * @var mixed 
  23. * @access private 
  24. */ 
  25. var $element_ns; 
  26. /** 
  27. * The XML type namespace (string or false) 
  28. * @var mixed 
  29. * @access private 
  30. */ 
  31. var $type_ns; 
  32. /** 
  33. * The XML element attributes (array or false) 
  34. * @var mixed 
  35. * @access private 
  36. */ 
  37. var $attributes; 
  38.  
  39. /** 
  40. * constructor 
  41. * @param string $name optional name 
  42. * @param mixed $type optional type name 
  43. * @param mixed $value optional value 
  44. * @param mixed $element_ns optional namespace of value 
  45. * @param mixed $type_ns optional namespace of type 
  46. * @param mixed $attributes associative array of attributes to add to element serialization 
  47. * @access public 
  48. */ 
  49. function soapval($name='soapval', $type=false, $value=-1, $element_ns=false, $type_ns=false, $attributes=false) { 
  50. parent::nusoap_base(); 
  51. $this->name = $name; 
  52. $this->type = $type; 
  53. $this->value = $value; 
  54. $this->element_ns = $element_ns; 
  55. $this->type_ns = $type_ns; 
  56. $this->attributes = $attributes; 
  57.  
  58. /** 
  59. * return serialized value 
  60. * @param string $use The WSDL use value (encoded|literal) 
  61. * @return string XML data 
  62. * @access public 
  63. */ 
  64. function serialize($use='encoded') { 
  65. return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); 
  66.  
  67. /** 
  68. * decodes a soapval object into a PHP native type 
  69. * @return mixed 
  70. * @access public 
  71. */ 
  72. function decode() { 
  73. return $this->value; 
/lib/nusoap.php  
  1. class soapval extends nusoap_base { 
  2. /** 
  3. * The XML element name 
  4. * @var string 
  5. * @access private 
  6. */ 
  7. var $name; 
  8. /** 
  9. * The XML type name (string or false) 
  10. * @var mixed 
  11. * @access private 
  12. */ 
  13. var $type; 
  14. /** 
  15. * The PHP value 
  16. * @var mixed 
  17. * @access private 
  18. */ 
  19. var $value; 
  20. /** 
  21. * The XML element namespace (string or false) 
  22. * @var mixed 
  23. * @access private 
  24. */ 
  25. var $element_ns; 
  26. /** 
  27. * The XML type namespace (string or false) 
  28. * @var mixed 
  29. * @access private 
  30. */ 
  31. var $type_ns; 
  32. /** 
  33. * The XML element attributes (array or false) 
  34. * @var mixed 
  35. * @access private 
  36. */ 
  37. var $attributes; 
  38.  
  39. /** 
  40. * constructor 
  41. * @param string $name optional name 
  42. * @param mixed $type optional type name 
  43. * @param mixed $value optional value 
  44. * @param mixed $element_ns optional namespace of value 
  45. * @param mixed $type_ns optional namespace of type 
  46. * @param mixed $attributes associative array of attributes to add to element serialization 
  47. * @access public 
  48. */ 
  49. function soapval($name='soapval', $type=false, $value=-1, $element_ns=false, $type_ns=false, $attributes=false) { 
  50. parent::nusoap_base(); 
  51. $this->name = $name; 
  52. $this->type = $type; 
  53. $this->value = $value; 
  54. $this->element_ns = $element_ns; 
  55. $this->type_ns = $type_ns; 
  56. $this->attributes = $attributes; 
  57.  
  58. /** 
  59. * return serialized value 
  60. * @param string $use The WSDL use value (encoded|literal) 
  61. * @return string XML data 
  62. * @access public 
  63. */ 
  64. function serialize($use='encoded') { 
  65. return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); 
  66.  
  67. /** 
  68. * decodes a soapval object into a PHP native type 
  69. * @return mixed 
  70. * @access public 
  71. */ 
  72. function decode() { 
  73. return $this->value;