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-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 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: Method.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Method.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_CodeGenerator_Php_Member_Abstract |
24 * @see Zend_CodeGenerator_Php_Member_Abstract |
25 */ |
25 */ |
36 require_once 'Zend/CodeGenerator/Php/Parameter.php'; |
36 require_once 'Zend/CodeGenerator/Php/Parameter.php'; |
37 |
37 |
38 /** |
38 /** |
39 * @category Zend |
39 * @category Zend |
40 * @package Zend_CodeGenerator |
40 * @package Zend_CodeGenerator |
41 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
41 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
42 * @license http://framework.zend.com/license/new-bsd New BSD License |
42 * @license http://framework.zend.com/license/new-bsd New BSD License |
43 */ |
43 */ |
44 class Zend_CodeGenerator_Php_Method extends Zend_CodeGenerator_Php_Member_Abstract |
44 class Zend_CodeGenerator_Php_Method extends Zend_CodeGenerator_Php_Member_Abstract |
45 { |
45 { |
46 /** |
46 /** |
218 $output .= implode(', ', $parameterOuput); |
218 $output .= implode(', ', $parameterOuput); |
219 } |
219 } |
220 |
220 |
221 $output .= ')' . self::LINE_FEED . $indent . '{' . self::LINE_FEED; |
221 $output .= ')' . self::LINE_FEED . $indent . '{' . self::LINE_FEED; |
222 |
222 |
223 if ($this->_body) { |
223 if ($this->_body && $this->isSourceDirty()) { |
224 $output .= ' ' |
224 $output .= ' ' |
225 . str_replace(self::LINE_FEED, self::LINE_FEED . $indent . $indent, trim($this->_body)) |
225 . str_replace(self::LINE_FEED, self::LINE_FEED . $indent . $indent, trim($this->_body)) |
226 . self::LINE_FEED; |
226 . self::LINE_FEED; |
|
227 } elseif ($this->_body) { |
|
228 $output .= $this->_body . self::LINE_FEED; |
227 } |
229 } |
228 |
230 |
229 $output .= $indent . '}' . self::LINE_FEED; |
231 $output .= $indent . '}' . self::LINE_FEED; |
230 |
232 |
231 return $output; |
233 return $output; |