Permalink
Browse files

Change namespace from pear2 to PEAR2, as approved by the PEAR Group.

  • Loading branch information...
1 parent d2872d0 commit 5c0be9395020b09d34181cce44a40b8419da28fb @saltybeagle saltybeagle committed May 12, 2010
Showing with 25 additions and 25 deletions.
  1. +4 −4 README
  2. +1 −1 RELEASE-0.2.0
  3. +5 −5 package.xml
  4. +6 −6 package_compatible.xml
  5. +9 −9 src/Exception.php
View
8 README
@@ -1,10 +1,10 @@
-pear2\Exception is the standard exception class for PEAR2.
+PEAR2\Exception is the standard exception class for PEAR2.
In addition to supporting the default signature of the built-in
-Exception class, pear2\Exception also supports passing a
+Exception class, PEAR2\Exception also supports passing a
cause of an exception, which can be another exception object
or a PEAR2_MultiErrors object. The error messages of the causes
are used when constructing the error message displayed when
-converting pear2\Exception to a string.
+converting PEAR2\Exception to a string.
-pear2\Exception should always be extended by your own custom exception
+PEAR2\Exception should always be extended by your own custom exception
class for the package.
View
@@ -25,7 +25,7 @@
function exceptionHandler($e)
{
- if ($e instanceof \pear2\Exception) {
+ if ($e instanceof \PEAR2\Exception) {
$causes = array();
$e->getCauseMessage($causes);
$causeMsg = '';
View
@@ -2,16 +2,16 @@
<package version="2.1" xmlns="http://pear.php.net/dtd/package-2.1" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.1 http://pear.php.net/dtd/package-2.1.xsd">
<name>PEAR2_Exception</name>
<channel>pear2.php.net</channel>
- <summary>pear2\Exception is the standard exception class for PEAR2.
+ <summary>PEAR2\Exception is the standard exception class for PEAR2.
</summary>
<description>In addition to supporting the default signature of the built-in
-Exception class, pear2\Exception also supports passing a
+Exception class, PEAR2\Exception also supports passing a
cause of an exception, which can be another exception object
or a PEAR2_MultiErrors object. The error messages of the causes
are used when constructing the error message displayed when
-converting pear2\Exception to a string.
+converting PEAR2\Exception to a string.
-pear2\Exception should always be extended by your own custom exception
+PEAR2\Exception should always be extended by your own custom exception
class for the package.</description>
<lead>
<name>Gregory Beaver</name>
@@ -51,7 +51,7 @@ class for the package.</description>
<notes>Initial Release</notes>
<contents>
<dir name="/">
- <dir name="src" baseinstalldir="pear2">
+ <dir name="src" baseinstalldir="PEAR2">
<file role="php" name="Exception.php"/>
</dir>
</dir>
View
@@ -2,16 +2,16 @@
<package version="2.1" xmlns="http://pear.php.net/dtd/package-2.1" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.1 http://pear.php.net/dtd/package-2.1.xsd">
<name>PEAR2_Exception</name>
<channel>pear2.php.net</channel>
- <summary>pear2\Exception is the standard exception class for PEAR2.
+ <summary>PEAR2\Exception is the standard exception class for PEAR2.
</summary>
<description>In addition to supporting the default signature of the built-in
-Exception class, pear2\Exception also supports passing a
+Exception class, PEAR2\Exception also supports passing a
cause of an exception, which can be another exception object
or a PEAR2_MultiErrors object. The error messages of the causes
are used when constructing the error message displayed when
-converting pear2\Exception to a string.
+converting PEAR2\Exception to a string.
-pear2\Exception should always be extended by your own custom exception
+PEAR2\Exception should always be extended by your own custom exception
class for the package.</description>
<lead>
<name>Gregory Beaver</name>
@@ -51,7 +51,7 @@ class for the package.</description>
<notes>Initial Release</notes>
<contents>
<dir name="/">
- <file role="php" name="php/pear2/Exception.php"/>
+ <file role="php" name="php/PEAR2/Exception.php"/>
</dir>
</contents>
<dependencies>
@@ -66,7 +66,7 @@ class for the package.</description>
</dependencies>
<phprelease>
<filelist>
- <install name="php/pear2/Exception.php" as="pear2/Exception.php"/>
+ <install name="php/PEAR2/Exception.php" as="PEAR2/Exception.php"/>
</filelist>
</phprelease>
</package>
View
@@ -27,13 +27,13 @@
* - Definable triggers, shot when exceptions occur
* - Added more context info available (like class, method or cause)
* - cause can be a PEAR2_Exception or an array of mixed
- * PEAR2_Exceptions or a \pear2\MultiErrors
+ * PEAR2_Exceptions or a \PEAR2\MultiErrors
* - callbacks for specific exception classes and their children
*
* 2) Usage example
*
* <code>
- * namespace pear2;
+ * namespace PEAR2;
* class PEAR2_MyPackage_Exception extends Exception {}
*
* class Test
@@ -51,7 +51,7 @@
*
* // each time a exception is thrown the 'myLogger' will be called
* // (its use is completely optional)
- * Exception::addObserver('\pear2\myLogger');
+ * Exception::addObserver('\PEAR2\myLogger');
* $test = new Test;
* try {
* $test->foo();
@@ -73,7 +73,7 @@
* @since Class available since Release 0.1.0
*
*/
-namespace pear2;
+namespace PEAR2;
abstract class Exception extends \Exception
{
private static $_observers = array();
@@ -85,10 +85,10 @@
* - PEAR2_Exception(string $message, int $code);
* - PEAR2_Exception(string $message, Exception $cause);
* - PEAR2_Exception(string $message, Exception $cause, int $code);
- * - PEAR2_Exception(string $message, pear2\MultiErrors $cause);
- * - PEAR2_Exception(string $message, pear2\MultiErrors $cause, int $code);
+ * - PEAR2_Exception(string $message, PEAR2\MultiErrors $cause);
+ * - PEAR2_Exception(string $message, PEAR2\MultiErrors $cause, int $code);
* @param string exception message
- * @param int|Exception|pear2\MultiErrors|null exception cause
+ * @param int|Exception|PEAR2\MultiErrors|null exception cause
* @param int|null exception code or null
*/
public function __construct($message, $p2 = null, $p3 = null)
@@ -98,7 +98,7 @@ public function __construct($message, $p2 = null, $p3 = null)
$code = $p2;
} elseif (is_object($p2)) {
if (!($p2 instanceof \Exception)) {
- throw new \Exception('exception cause must be Exception, or pear2\MultiErrors');
+ throw new \Exception('exception cause must be Exception, or PEAR2\MultiErrors');
}
$code = $p3;
@@ -158,7 +158,7 @@ public function getCauseMessage(array &$causes)
$causes[] = $cause;
if ($this->getPrevious() instanceof self) {
$this->getPrevious()->getCauseMessage($causes);
- } elseif ($this->getPrevious() instanceof \pear2\MultiErrors) {
+ } elseif ($this->getPrevious() instanceof \PEAR2\MultiErrors) {
foreach ($this->getPrevious() as $cause) {
if ($cause instanceof self) {
$cause->getCauseMessage($causes);

0 comments on commit 5c0be93

Please sign in to comment.