You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.7 KiB

  1. <?php
  2. /*
  3. This file is part of ActiveLink PHP XML Package (www.active-link.com).
  4. Copyright (c) 2002-2004 by Zurab Davitiani
  5. You can contact the author of this software via E-mail at
  6. hattrick@mailcan.com
  7. ActiveLink PHP XML Package is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU Lesser General Public License as published by
  9. the Free Software Foundation; either version 2.1 of the License, or
  10. (at your option) any later version.
  11. ActiveLink PHP XML Package is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public License
  16. along with ActiveLink PHP XML Package; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. /**
  20. * Leaf class is part of a Tree-Branch-Leaf trio
  21. * @class Leaf
  22. * @package org.active-link.xml
  23. * @author Zurab Davitiani
  24. * @version 0.4.0
  25. * @see Tree, Branch
  26. */
  27. class Leaf {
  28. // protected variables
  29. var $value;
  30. /**
  31. * Constructor for the object
  32. * @method Leaf
  33. * @param optional mixed value
  34. * @returns none
  35. */
  36. function Leaf($value = "") {
  37. $this->setValue($value);
  38. }
  39. /**
  40. * Gets Leaf object value
  41. * @method getValue
  42. * @returns value of the object
  43. */
  44. function getValue() {
  45. return $this->value;
  46. }
  47. /**
  48. * Sets Leaf object to the specified value
  49. * @method setValue
  50. * @param mixed value
  51. * @returns none
  52. */
  53. function setValue($value) {
  54. $this->value = $value;
  55. }
  56. }
  57. ?>