AdapterInterface.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_Validate
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * @category Zend
  23. * @package Zend_Validate
  24. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  25. * @license http://framework.zend.com/license/new-bsd New BSD License
  26. */
  27. interface Zend_Validate_Barcode_AdapterInterface
  28. {
  29. /**
  30. * Checks the length of a barcode
  31. *
  32. * @param string $value The barcode to check for proper length
  33. * @return boolean
  34. */
  35. public function checkLength($value);
  36. /**
  37. * Checks for allowed characters within the barcode
  38. *
  39. * @param string $value The barcode to check for allowed characters
  40. * @return boolean
  41. */
  42. public function checkChars($value);
  43. /**
  44. * Validates the checksum
  45. *
  46. * @param string $value The barcode to check the checksum for
  47. * @return boolean
  48. */
  49. public function checksum($value);
  50. /**
  51. * Returns if barcode uses a checksum
  52. *
  53. * @return boolean
  54. */
  55. public function getCheck();
  56. /**
  57. * Sets the checksum validation
  58. *
  59. * @param boolean $check
  60. * @return Zend_Validate_Barcode_Adapter Provides a fluent interface
  61. */
  62. public function setCheck($check);
  63. }