ParserInterface.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_Markup
  17. * @subpackage Parser
  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. * @category Zend
  24. * @package Zend_Markup
  25. * @subpackage Parser
  26. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @license http://framework.zend.com/license/new-bsd New BSD License
  28. */
  29. interface Zend_Markup_Parser_ParserInterface
  30. {
  31. /**
  32. * Parse a string
  33. *
  34. * This should output something like this:
  35. *
  36. * <code>
  37. * array(
  38. * array(
  39. * 'tag' => '[tag="a" attr=val]',
  40. * 'type' => Zend_Markup::TYPE_TAG,
  41. * 'name' => 'tag',
  42. * 'stoppers' => array('[/]', '[/tag]'),
  43. * 'attributes' => array(
  44. * 'tag' => 'a',
  45. * 'attr' => 'val'
  46. * )
  47. * ),
  48. * array(
  49. * 'tag' => 'value',
  50. * 'type' => Zend_Markup::TYPE_NONE
  51. * ),
  52. * array(
  53. * 'tag' => '[/tag]',
  54. * 'type' => Zend_Markup::TYPE_STOPPER,
  55. * 'name' => 'tag',
  56. * 'stoppers' => array(),
  57. * 'attributes' => array()
  58. * )
  59. * )
  60. * </code>
  61. *
  62. * @param string $value
  63. * @return array
  64. */
  65. public function parse($value);
  66. }