cvs: pear /Services_Webservice/Webservice Definition.php
| From: | Philippe Jausions | Date: | Sat, 30 Jul 2005 18:28:29 +0000 |
| Subject: | cvs: pear /Services_Webservice/Webservice Definition.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33476@lists.php.net to get a copy of this message | ||
jausions Sat Jul 30 14:28:29 2005 EDT
Modified files:
/pear/Services_Webservice/Webservice Definition.php
Log:
Simplified the method's docblock description parsing.
http://cvs.php.net/diff.php/pear/Services_Webservice/Webservice/Definition.php?r1=1.12&r2=1.13&ty=u
Index: pear/Services_Webservice/Webservice/Definition.php
diff -u pear/Services_Webservice/Webservice/Definition.php:1.12
pear/Services_Webservice/Webservice/Definition.php:1.13
--- pear/Services_Webservice/Webservice/Definition.php:1.12 Fri Jul 29 12:30:16 2005
+++ pear/Services_Webservice/Webservice/Definition.php Sat Jul 30 14:28:27 2005
@@ -19,7 +19,7 @@
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Definition.php,v 1.12 2005/07/29 16:30:16 jausions Exp $
+ * @version CVS: $Id: Definition.php,v 1.13 2005/07/30 18:28:27 jausions Exp $
* @link http://pear.php.net/package/Services_Webservice
*/
@@ -309,9 +309,9 @@
if ($method->isPublic()
&& !in_array($methodName, $this->_hiddenMethods)) {
- $docComments = $method->getDocComment();
+ $docComments = trim($method->getDocComment());
- if (!trim($docComments)) {
+ if (!$docComments) {
throw new Services_Webservice_Definition_NoDocCommentException('Method
' . $this->_classname . '::' . $methodName . '() is missing docblock
comment.');
}
@@ -326,8 +326,8 @@
}
// Description
- $_docComments_Description = trim(str_replace('/**', '',
substr($docComments, 0, strpos($docComments, '@'))));
- $docComments_Description = trim(substr($_docComments_Description,
strpos($_docComments_Description, '*') + 1, strpos($_docComments_Description,
'*', 1) - 1));
+ $docComments_Description = trim(substr($docComments, 0, strpos($docComments,
'* @')), "\r\n\t *\0\x0B/");
+
$this->_wsdlStruct[$this->_classname]['method'][$methodName]['description']
= $docComments_Description;
// Params