equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_CodeGenerator |
16 * @package Zend_CodeGenerator |
17 * @subpackage PHP |
17 * @subpackage PHP |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
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 |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Docblock.php 24593 2012-01-05 20:35:02Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_CodeGenerator_Php_Abstract |
24 * @see Zend_CodeGenerator_Php_Abstract |
25 */ |
25 */ |
31 require_once 'Zend/CodeGenerator/Php/Docblock/Tag.php'; |
31 require_once 'Zend/CodeGenerator/Php/Docblock/Tag.php'; |
32 |
32 |
33 /** |
33 /** |
34 * @category Zend |
34 * @category Zend |
35 * @package Zend_CodeGenerator |
35 * @package Zend_CodeGenerator |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_CodeGenerator_Php_Docblock extends Zend_CodeGenerator_Php_Abstract |
39 class Zend_CodeGenerator_Php_Docblock extends Zend_CodeGenerator_Php_Abstract |
40 { |
40 { |
41 /** |
41 /** |
204 * @param string $content |
204 * @param string $content |
205 * @return string |
205 * @return string |
206 */ |
206 */ |
207 protected function _docCommentize($content) |
207 protected function _docCommentize($content) |
208 { |
208 { |
209 $indent = $this->getIndentation(); |
209 $indent = $this->getIndentation(); |
210 $output = $indent . '/**' . self::LINE_FEED; |
210 $output = $indent . '/**' . self::LINE_FEED; |
211 $content = wordwrap($content, 80, self::LINE_FEED); |
211 $content = wordwrap($content, 80, self::LINE_FEED); |
212 $lines = explode(self::LINE_FEED, $content); |
212 $lines = explode(self::LINE_FEED, $content); |
|
213 |
213 foreach ($lines as $line) { |
214 foreach ($lines as $line) { |
214 $output .= $indent . ' *'; |
215 $output .= $indent . ' *'; |
215 if ($line) { |
216 if ($line) { |
216 $output .= " $line"; |
217 $output .= " $line"; |
217 } |
218 } |
218 $output .= self::LINE_FEED; |
219 $output .= self::LINE_FEED; |
219 } |
220 } |
|
221 |
|
222 $output = rtrim($output, ' *' . self::LINE_FEED) . self::LINE_FEED; |
|
223 |
220 $output .= $indent . ' */' . self::LINE_FEED; |
224 $output .= $indent . ' */' . self::LINE_FEED; |
221 return $output; |
225 return $output; |
222 } |
226 } |
223 |
|
224 } |
227 } |