cvs: pear /Services_Webservice/Webservice Definition.php

From: Date: Thu, 28 Jul 2005 18:30:16 +0000
Subject: cvs: pear /Services_Webservice/Webservice Definition.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33441@lists.php.net to get a copy of this message
jausions Thu Jul 28 14:30:16 2005 EDT Modified files: /pear/Services_Webservice/Webservice Definition.php Log: http://cvs.php.net/diff.php/pear/Services_Webservice/Webservice/Definition.php?r1=1.6&r2=1.7&ty=u Index: pear/Services_Webservice/Webservice/Definition.php diff -u pear/Services_Webservice/Webservice/Definition.php:1.6 pear/Services_Webservice/Webservice/Definition.php:1.7 --- pear/Services_Webservice/Webservice/Definition.php:1.6 Thu Jul 28 10:59:16 2005 +++ pear/Services_Webservice/Webservice/Definition.php Thu Jul 28 14:30:15 2005 @@ -19,13 +19,19 @@ * @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.6 2005/07/28 14:59:16 jausions Exp $ + * @version CVS: $Id: Definition.php,v 1.7 2005/07/28 18:30:15 jausions Exp $ * @link http://pear.php.net/package/Services_Webservice */ // {{{ class Services_Webservice_Definition /** + * Include exception class declarations + */ +require_once 'Services/Webservice/Definition/Exception.php'; + + +/** * Class to perform the introspection of the web service * * Uses Reflection API and parses docblock comments to do introspection @@ -106,7 +112,6 @@ } elseif (is_string($class)) { $this->_classname = $class; } else { - require_once 'Services/Webservice/Definition/Exception.php'; throw new Services_Webservice_Definition_NotClassException('Expected a class name or instance.'); } if (trim($namespace) != '') { @@ -191,7 +196,6 @@ include_once 'Services/Webservice/Definition/' . basename($format) . '.php'; $class = 'Services_Webservice_Definition_' . $format; if (!class_exists($class)) { - require_once 'Services/Webservice/Definition/Exception.php'; throw new Services_Webservice_Definition_UnknownFormatException('Unknown definition format.'); } $formatter = new $class($this); @@ -232,6 +236,7 @@ * * @var string * @access private + * @throws Services_Webservice_Definition_NoDocCommentException */ protected function classPropertiesIntoStruct($className) { @@ -246,7 +251,6 @@ $propertyName = $properties[$i]->getName(); if (!trim($docComments)) { - require_once 'Services/Webservice/Definition/Exception.php'; throw new Services_Webservice_Definition_NoDocCommentException('Property ' . $class . '::' . $propertyName . ' is missing docblock comment.'); } @@ -288,6 +292,7 @@ * Parses classes methods into struct * * @access protected + * @throws Services_Webservice_Definition_NoDocCommentException */ protected function classMethodsIntoStruct() { @@ -302,7 +307,6 @@ $docComments = $method->getDocComment(); if (!trim($docComments)) { - require_once 'Services/Webservice/Definition/Exception.php'; throw new Services_Webservice_Definition_NoDocCommentException('Method ' . $this->_classname . '::' . $methodName . ' is missing docblock comment.'); } @@ -324,6 +328,9 @@ // Params preg_match_all('~@param\s(\S+)~', $docComments, $param); $params = $method->getParameters(); + if (count(%params) != count($param)) { + + } for ($i = 0; $i < count($params); ++$i) { $_class = $params[$i]->getClass(); $_type = ($_class) ? $_class->getName() : $param[1][$i];

« previous php.pear.cvs (#33441) next »