cvs: pear /XML_Statistics Statistics.php
| From: | Stephan Schmidt | Date: | Mon, 25 Oct 2004 19:16:21 +0000 |
| Subject: | cvs: pear /XML_Statistics Statistics.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-25221@lists.php.net to get a copy of this message | ||
schst Mon Oct 25 15:16:21 2004 EDT
Modified files:
/pear/XML_Statistics Statistics.php
Log:
Added tagnames to error messages (Request #2548), patch supplied by mj
http://cvs.php.net/diff.php/pear/XML_Statistics/Statistics.php?r1=1.2&r2=1.3&ty=u
Index: pear/XML_Statistics/Statistics.php
diff -u pear/XML_Statistics/Statistics.php:1.2 pear/XML_Statistics/Statistics.php:1.3
--- pear/XML_Statistics/Statistics.php:1.2 Thu Sep 18 15:15:26 2003
+++ pear/XML_Statistics/Statistics.php Mon Oct 25 15:16:21 2004
@@ -19,7 +19,7 @@
// | (http://phpxmlclasses.sourceforge.net/) |
// +----------------------------------------------------------------------+
//
-// $Id: Statistics.php,v 1.2 2003/09/18 19:15:26 schst Exp $
+// $Id: Statistics.php,v 1.3 2004/10/25 19:16:21 schst Exp $
/**
* XML/Statistics.php
@@ -277,7 +277,7 @@
{
if ($tagname != null) {
if (!isset($this->_attribsPerTag[$tagname])) {
- return $this->raiseError('Tag not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
+ return $this->raiseError('Tag {$tagname} not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
}
$list = $this->_attribsPerTag[$tagname];
} else {
@@ -307,7 +307,7 @@
if (isset($this->_tags[$tagname])) {
return $this->_tags[$tagname];
}
- return $this->raiseError('Tag not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
+ return $this->raiseError('Tag {$tagname} not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
}
/**
@@ -328,7 +328,7 @@
if (isset($this->_tagsInDepth[$depth])) {
return $this->_tagsInDepth[$depth];
}
- return $this->raiseError('Inavid depth.', XML_STATISTICS_ERROR_INVALID_DEPTH);
+ return $this->raiseError('Invalid depth {$depth}.',
XML_STATISTICS_ERROR_INVALID_DEPTH);
}
/**
@@ -356,16 +356,16 @@
if (isset($this->_attribs[$attribute])) {
return $this->_attribs[$attribute];
}
- return $this->raiseError('Attribute not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
+ return $this->raiseError('Attribute {$attribute} not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
}
if (!isset($this->_attribsPerTag[$tagname])) {
- return $this->raiseError('Tag not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
+ return $this->raiseError('Tag {$tagname} not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
}
if (isset($this->_attribsPerTag[$tagname][$attribute])) {
return $this->_attribsPerTag[$tagname][$attribute];
}
- return $this->raiseError('Attribute not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
+ return $this->raiseError('Attribute {$attribute} not found.',
XML_STATISTICS_ERROR_TAG_NOT_FOUND);
}
/**
@@ -389,7 +389,7 @@
if (isset($this->_pis[$target])) {
return $this->_pis[$target];
}
- return $this->raiseError('Processing Instruction with specified target not
found.', XML_STATISTICS_ERROR_PI_NOT_FOUND);
+ return $this->raiseError('Processing Instruction with specified target {$target}
not found.', XML_STATISTICS_ERROR_PI_NOT_FOUND);
}
/**
@@ -419,7 +419,7 @@
if (isset($this->_extEntities[$name])) {
return $this->_extEntities[$name];
}
- return $this->raiseError('External entity target not found.',
XML_STATISTICS_ERROR_EXTERNAL_ENTITY_NOT_FOUND);
+ return $this->raiseError('External entity target {$name} not found.',
XML_STATISTICS_ERROR_EXTERNAL_ENTITY_NOT_FOUND);
}
/**