Validate.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service
  17. * @subpackage DeveloperGarden
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Service_DeveloperGarden_Request_RequestAbstract
  24. */
  25. require_once 'Zend/Service/DeveloperGarden/Request/RequestAbstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service
  29. * @subpackage DeveloperGarden
  30. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @author Marco Kaiser
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Service_DeveloperGarden_Request_SmsValidation_Validate
  35. extends Zend_Service_DeveloperGarden_Request_RequestAbstract
  36. {
  37. /**
  38. * the keyword to be used for validation
  39. *
  40. * @var string
  41. */
  42. public $keyword = null;
  43. /**
  44. * the number
  45. *
  46. * @var string
  47. */
  48. public $number = null;
  49. /**
  50. * returns the keyword
  51. *
  52. * @return string $keyword
  53. */
  54. public function getKeyword ()
  55. {
  56. return $this->keyword;
  57. }
  58. /**
  59. * create the class for validation a sms keyword
  60. *
  61. * @param integer $environment
  62. * @param string $keyword
  63. * @param string $number
  64. */
  65. public function __construct($environment, $keyword = null, $number = null)
  66. {
  67. parent::__construct($environment);
  68. $this->setKeyword($keyword)
  69. ->setNumber($number);
  70. }
  71. /**
  72. * set a new keyword
  73. *
  74. * @param string $keyword
  75. * @return Zend_Service_DeveloperGarden_Request_SmsValidation_Validate
  76. */
  77. public function setKeyword($keyword)
  78. {
  79. $this->keyword = $keyword;
  80. return $this;
  81. }
  82. /**
  83. * returns the number
  84. *
  85. * @return string $number
  86. */
  87. public function getNumber()
  88. {
  89. return $this->number;
  90. }
  91. /**
  92. * set a new number
  93. *
  94. * @param string $number
  95. * @return Zend_Service_DeveloperGarden_Request_SmsValidation_Validate
  96. */
  97. public function setNumber($number)
  98. {
  99. $this->number = $number;
  100. return $this;
  101. }
  102. }