File indexing completed on 2024-06-16 05:30:14

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Markup
0017  * @subpackage Parser
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /**
0024  * @category   Zend
0025  * @package    Zend_Markup
0026  * @subpackage Parser
0027  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0028  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0029  */
0030 interface Zend_Markup_Parser_ParserInterface
0031 {
0032     /**
0033      * Parse a string
0034      *
0035      * This should output something like this:
0036      *
0037      * <code>
0038      * array(
0039      *     array(
0040      *         'tag'        => '[tag="a" attr=val]',
0041      *         'type'       => Zend_Markup::TYPE_TAG,
0042      *         'name'       => 'tag',
0043      *         'stoppers'   => array('[/]', '[/tag]'),
0044      *         'attributes' => array(
0045      *             'tag'  => 'a',
0046      *             'attr' => 'val'
0047      *         )
0048      *     ),
0049      *     array(
0050      *         'tag'   => 'value',
0051      *         'type'  => Zend_Markup::TYPE_NONE
0052      *     ),
0053      *     array(
0054      *         'tag'        => '[/tag]',
0055      *         'type'       => Zend_Markup::TYPE_STOPPER,
0056      *         'name'       => 'tag',
0057      *         'stoppers'   => array(),
0058      *         'attributes' => array()
0059      *     )
0060      * )
0061      * </code>
0062      *
0063      * @param  string $value
0064      * @return array
0065      */
0066     public function parse($value);
0067 }