Permalink
Browse files

add package.xml and assorted files

  • Loading branch information...
1 parent 7fb427b commit 96723f08ff473aa6780239c786d4606ccaeb642c @cellog cellog committed Oct 5, 2007
Showing with 117 additions and 0 deletions.
  1. +2 −0 CREDITS
  2. +35 −0 README
  3. +1 −0 RELEASE-0.1.0
  4. +79 −0 package.xml
View
@@ -0,0 +1,2 @@
+;; maintainers of Autoload
+Gregory Beaver [cellog] <cellog@php.net> (lead)
View
35 README
@@ -0,0 +1,35 @@
+PEAR2_MultiErrors provides a simple and effective mechanism for
+aggregating many errors and organizing them by severity.
+
+Errors are represented by PHP's built in exception object, and
+severity levels are represented by PHP's pre-defined error levels
+E_ERROR, E_WARNING, or E_NOTICE. Adding errors to the PEAR2_MultiErrors
+object is simple, and done like adding to an array. Retrieving errors can
+be done with iteration, and count() can be used to determine whether errors
+were added.
+
+<?php
+include '/path/to/PEAR2/Autoload.php';
+$a = new PEAR2_MultiErrors;
+$a->E_ERROR[] = new Exception('message one');
+$a->E_WARNING[] = new PEAR2_BlahException('message two');
+// iterate over all errors
+foreach ($a as $error) {...}
+// iterate over E_ERROR severity
+foreach ($a->E_ERROR as $error) {...}
+count($a); // 2
+count($a->E_ERROR); // 1
+count($a->E_WARNING); // 1
+count(E_NOTICE); // 0
+?>
+
+Used in conjuction with PEAR2_Exception, it can also be used as a "cause"
+of an Exception:
+
+<?php
+include '/path/to/PEAR2/Autoload.php';
+$a = new PEAR2_MultiErrors;
+$a->E_ERROR[] = new Exception('message one');
+$a->E_ERROR[] = new PEAR2_BlahException('message two');
+throw new PEAR2_Exception('task failed', $a);
+?>
View
@@ -0,0 +1 @@
+Initial Release
View
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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_MultiErrors</name>
+ <channel>pear2.php.net</channel>
+ <summary>PEAR2_MultiErrors provides a simple and effective mechanism for
+</summary>
+ <description>aggregating many errors and organizing them by severity.
+
+Errors are represented by PHP's built in exception object, and
+severity levels are represented by PHP's pre-defined error levels
+E_ERROR, E_WARNING, or E_NOTICE. Adding errors to the PEAR2_MultiErrors
+object is simple, and done like adding to an array. Retrieving errors can
+be done with iteration, and count() can be used to determine whether errors
+were added.
+
+&lt;?php
+include '/path/to/PEAR2/Autoload.php';
+$a = new PEAR2_MultiErrors;
+$a-&gt;E_ERROR[] = new Exception('message one');
+$a-&gt;E_WARNING[] = new PEAR2_BlahException('message two');
+// iterate over all errors
+foreach ($a as $error) {...}
+// iterate over E_ERROR severity
+foreach ($a-&gt;E_ERROR as $error) {...}
+count($a); // 2
+count($a-&gt;E_ERROR); // 1
+count($a-&gt;E_WARNING); // 1
+count(E_NOTICE); // 0
+?&gt;
+
+Used in conjuction with PEAR2_Exception, it can also be used as a &quot;cause&quot;
+of an Exception:
+
+&lt;?php
+include '/path/to/PEAR2/Autoload.php';
+$a = new PEAR2_MultiErrors;
+$a-&gt;E_ERROR[] = new Exception('message one');
+$a-&gt;E_ERROR[] = new PEAR2_BlahException('message two');
+throw new PEAR2_Exception('task failed', $a);
+?&gt;</description>
+ <lead>
+ <name>Gregory Beaver</name>
+ <user>cellog</user>
+ <email>cellog@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2007-10-05</date>
+ <version>
+ <release>0.1.0</release>
+ <api>0.1.0</api>
+ </version>
+ <stability>
+ <release>devel</release>
+ <api>alpha</api>
+ </stability>
+ <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
+ <notes>Initial Release</notes>
+ <contents>
+ <dir name="/">
+ <dir name="src" baseinstalldir="PEAR2">
+ <dir name="MultiErrors">
+ <file role="php" name="Exception.php"/>
+ </dir>
+ <file role="php" name="MultiErrors.php"/>
+ </dir>
+ </dir>
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.0</min>
+ </php>
+ <pearinstaller>
+ <min>2.0.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>

0 comments on commit 96723f0

Please sign in to comment.