A Qcodo based CMS/ecommerce framework
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.

52 lines
1.1 KiB

13 years ago
  1. <?php
  2. /************************
  3. * This is the Advanced List Item class allowing us to specify custom conditions in a drop down
  4. * list to filter a column on in a data grid.
  5. *
  6. * This is released under the MIT license. See the README.txt file for more details.
  7. *
  8. * @author Gagandeep Grewal, ggrewal@icomproductions.ca
  9. * @copyright ICOM Productions, Inc. 2007 - 2008
  10. * @name AdvancedListItem
  11. * @version 1.0.0
  12. */
  13. class AdvancedListItem {
  14. //member variables
  15. //name of the list item
  16. protected $name;
  17. //Filter to be applied for this item
  18. protected $filter;
  19. //Default constructor
  20. public function __construct($name, $filter=null) {
  21. $this->name = $name;
  22. $this->filter = $filter;
  23. }
  24. //Set function for public properties
  25. public function __set($strName, $mixValue) {
  26. switch ($strName) {
  27. case "Name":
  28. $this->name = QType::Cast($mixValue, QType::String);
  29. break;
  30. case "Filter":
  31. $this->filter = QType::Cast($mixValue, QType::Object);
  32. break;
  33. }
  34. }
  35. //Get function for public properties
  36. public function __get($strName) {
  37. switch ($strName) {
  38. case "Name":
  39. return $this->name;
  40. case "Filter":
  41. return $this->filter;
  42. }
  43. }
  44. }
  45. ?>