Timezones.php 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. *
  4. * PHP Pro Bid $Id$ NQxuaEfx44lHa1bP5jTSEaVK84ovq7gqeVZUjRsbh3w=
  5. *
  6. * @link http://www.phpprobid.com
  7. * @copyright Copyright (c) 2014 Online Ventures Software LTD & CodeCube SRL
  8. * @license http://www.phpprobid.com/license Commercial License
  9. *
  10. * @version 7.0
  11. */
  12. /**
  13. * timezones table service class
  14. */
  15. namespace Ppb\Service;
  16. use Ppb\Db\Table\Timezones as TimezonesTable;
  17. class Timezones extends AbstractService
  18. {
  19. /**
  20. *
  21. * class constructor
  22. */
  23. public function __construct()
  24. {
  25. parent::__construct();
  26. $this->setTable(
  27. new TimezonesTable());
  28. }
  29. /**
  30. *
  31. * get all timezones
  32. * to be used for the timezone selector
  33. *
  34. * @return array
  35. */
  36. public function getMultiOptions()
  37. {
  38. $data = array();
  39. $rows = $this->_table->fetchAll();
  40. foreach ($rows as $row) {
  41. $data[(string) $row['value']] = $row['caption'];
  42. }
  43. return $data;
  44. }
  45. }