3 // +----------------------------------------------------------------------+
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2002 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.02 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Authors: Alan Knowles <alan@akbkhome.com> |
17 // +----------------------------------------------------------------------+
21 * Method and Class parameter data container
23 * @package PHP_CodeDoc
25 * @author Alan Knowles <alan@akbkhome.com>
28 class PHP_CodeDoc_Data_Param {
29 var $name =''; // name of parameter
30 var $Value = ''; // default value
38 $lines = explode("\n", $this->desc);
39 if (count($lines) < 2) {
42 if (preg_match('/array/i', $this->type) && preg_match('/\+\s+[a-z0-9_-]+:/', $this->desc)) {
45 $ret = array_shift($lines) . "<br/><dl>";
48 foreach($lines as $l) {
50 if (preg_match('/^\s+\+\s+([a-z0-9_-]+):\s+(.*)$/i', $l, $m)) {
54 $cur = array('key'=>$m[1], 'val' => $m[2] );
58 $cur['val'] .= "\n" . $l;
66 foreach($sets as $kv) {
67 $ret.="<dt>" . $kv['key'] . '</dt><dd>' . str_replace('\n', '<br/>', htmlspecialchars($kv['val'])) . '</dd>';
73 return implode('<br/>', $lines);