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