<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://purl.org/rss/1.0/"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
    <channel rdf:about="http://pear.php.net/">
    <link>http://pear.php.net/</link>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <dc:language>en-us</dc:language><items>
<rdf:Seq><rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=171"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=60"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=14"/>
</rdf:Seq>
</items>

<title>PEPr: Latest proposals containing table config</title>
<description>The latest PEPr proposals containing table config</description>
</channel>

<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=171">
 <title>PEPr Proposal [171]: Networking::Monitor</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=171</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Networking::Monitor&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/cyberscribe&quot;&gt;Robert Peake&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Purpose&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To provide a unified interface for checking the availability of services on external servers and sending meaningful alerts through a variety of media if a service becomes unavailable.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Elements&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The service monitoring aspect of this package is essentially a unified interface to a number of packages designed to interact with Internet services. Initially, this list includes:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; Net_SMTP&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; HTTP_Request&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; Net_DNS&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt; Net_FTP&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
And could also include the Net_Telnet package that is currently being proposed once it has become more stable.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The alert sending aspect is currently a unified interface to Net_SMTP, with plans to extend this to Net_SMS as well, whereby messages can be generated and sent directly from the package. This makes this package more robust in the event that the monitored servce that goes down is the SMTP relay for the package itself -- the package can still generate and send an SMTP message to an external address.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Structure&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The package object inputs and stores two arrays -- one representing the person(s) to be notified in the event of a failure and the other representing the servers to be monitored. &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Each person can be assigned a notification type (currently SMTP only). Each server can be assigned any number and combination of services to be monitored (currently SMTP, HTTP, HTTPS, DNS, and FTP). &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Application&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The most common application for this package is a simple monitoring script that can be run at a scheduled interval (via php-cli) to check remote services and send an alert if a service is down.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;&lt;br /&gt;
require('Net/Monitor.php');&lt;br /&gt;&lt;br /&gt;
$monitor = new Net_Monitor();&lt;br /&gt;&lt;br /&gt;
$alerts = array('User1' =&amp;gt; array('SMTP'=&amp;gt;'user1@example.com'),&lt;br /&gt;&lt;br /&gt;
               'User2' =&amp;gt; array('SMTP'=&amp;gt;'user2@example.com'));&lt;br /&gt;&lt;br /&gt;
$services = array('foo.example.com'=&amp;gt;array('SMTP','DNS'),&lt;br /&gt;&lt;br /&gt;
                 'bar.example.com'=&amp;gt;array('HTTP','FTP','DNS'));&lt;br /&gt;&lt;br /&gt;
$monitor-&amp;gt;setAlerts($alerts);&lt;br /&gt;&lt;br /&gt;
$monitor-&amp;gt;setServices($services);&lt;br /&gt;&lt;br /&gt;
$monitor-&amp;gt;checkAll();&lt;br /&gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Useful Features&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;em&gt;Custom Subject and Alert Message&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Net_Monitor optionally takes in parameters to customize the subject line when sending email alerts as well as a simple format for customizing alerts. The default string, &amp;quot;%h: %s: %m&amp;quot; returns, for example, &amp;quot;foo.example.com: SMTP: Operation timed out.&amp;quot; Other formats are possible using this pattern.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;em&gt;Smart Alerts&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Net_Monitor stores the previous results of its tests (state) in a user-defined file. Alerts are only sent if the state has changed. This means that if Net_Monitor is invoked on the same set of hosts/services on a regular basis, notifications will be sent only when the state of a host/service changes. &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Optionally, Net_Monitor can be configured with notify_ok set to 0. This will disable Net_Monitor sending out alerts when a state changes from an error code to a code signifying everything is OK.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Net_Monitor can also be optionally configured with notify_change set to 0. This will disable Net_Monitor sending out alerts when a state signifying a potential problem changes to another state signifiying a potential problem (e.g. from 404, meaning Page Not Found, to 0, meaning down). Both settings work independently of each other.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Calling Net_Monitor::resetState() deletes the state file and clears variables associated with results for a particular instance of the class, allowing the end user to start a new monitoring session without having to restart PHP. Furthermore, calling Net_Monitor::resetHostState() with a host name and (optional) service name will reset the state for that given host (and service), allowing the end user to reset the state of a single host/service programatically through the Net_Monitor API.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Possible Extensions&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;em&gt;Connection Time Monitoring&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
One proposed extension is the ability to monitor the time it takes to connect to a service and return a value. This could be accomplished using the Benchmark package. By logging this data to a database, graphs of server response over time could be generated. This idea is currently under review, mostly to ascertain how accurate the connection time values would be given that the connections depend upon external classes with variable overhead.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;em&gt;Document Change Monitoring&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Another proposed extension is the ability to check an HTTP or FTP file against a previously stored md5 sum of the file to see if it has changed. This feature would be the responsibility of the HTTP/FTP service clients (wrappers to HTTP_Request and Net_FTP) to accept an array of arguments containing the server fqdn and the file to check instead of just a string of the server fqdn.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
It is unclear if similar behavior extended to SMTP or DNS would prove useful. Ideas include issuing a VRFY command over SMTP to verify that an account exists on the server or checking that either a zone file has changed or a particular fqdn's IP address has changed on the DNS server.
 </content:encoded>
 <dc:date>2004-11-02T16:24:32-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=60">
 <title>PEPr Proposal [60]: RFC::How the QA Team will work.</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=60</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        RFC::How the QA Team will work.&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/dufuz&quot;&gt;Helgi Þormar Þorbjörnsson&lt;/a&gt;&amp;nbsp;[&lt;a href=&quot;http://www.pear.php.net/wishlist.php/dufuz&quot;&gt;Wishlist&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Title: RFC - How the QA Team will work.&lt;br /&gt;&lt;br /&gt;
------------------------------------------------------&lt;br /&gt;&lt;br /&gt;
Author:   helgi at trance dot is, smith at backendmedia dot com&lt;br /&gt;&lt;br /&gt;
Revision: 2&lt;br /&gt;&lt;br /&gt;
Status:   Active&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
There has been talked about forming QA team, but no action yet taken. The following is proposal of how the QA team will work, what rights they have and so on.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;The Issues&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
-----------&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
There is no official QA team for PEAR. There are only a few people who try to help with QA issues but they don't have any official status or rights to resolve issues themselves if needed. PEAR claims quality but that can't be met if there is no real QA team. PEAR group has been talking about fine tuning karma for all users so the current &amp;quot;user has access to everything under /pear in cvs&amp;quot; karma policy will be eliminated and thus QA needs special karma when that happens. &lt;br /&gt;&lt;br /&gt;
More importantly, there is currently no formal process or entity to handle orphaned packages or urgent fixes to packages.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To summarize the problem&lt;br /&gt;&lt;br /&gt;
        &lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;  No QA team = can't claim Quality&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;  Nobody has defined how the QA team is supposed to work, how it should be structured and what its rights (karma) are supposed to be.&lt;br /&gt;&lt;br /&gt;
        &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;The Proposed Solution.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
-----------------------&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;small side note:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
     Karma in this context doesn't just mean &amp;quot;technical&amp;quot; karma but also &amp;quot;political&amp;quot;, meaning that they not only have the necessary access rights from a technical perspective (which currently most of the pear devs have anyways). They also have the right to commit to any part of the cvs if they deem it necessary (obviously following the necessary regulations)&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;&lt;strong&gt;QA team membership:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
     &lt;strong&gt;How the initial members are chosen:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
         If there are more applicants than seats, there should be an open election, where everyone may cast as many votes as there are seats (only 1 vote may be cast per candidate). Of course, if there are less people than seats, all may be accepted and the remaining seats can be filled by QA group vote. Once the core team is formed all further team members can be voted in as per the rules stated below.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
There will be a QA core team with a limited number (no more than 7, with the pear group this should give a sufficient amount of people with enough karma that can react to bad releases) people with extended &amp;quot;core-QA-karma&amp;quot;. In order for the QA core team to react quickly,  the core QA team should be spread out across all time zones as good as possible. This rather small number should empower the QA team sufficiently to handle issues but doesn't trivialize access rights.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
     &lt;strong&gt;Note:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
         This issue needs more discussion since Klaus raised a good point in his post&lt;br /&gt;&lt;br /&gt;
     &lt;a href=&quot;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26756&quot;&gt;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26756&lt;/a&gt; but the problem is that it isn't wise to give many users so much karma.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
All other people interested are free to join the QA team. However potential new members for the QA team (core and non core) must be voted in by a 2/3 majority of the existing members of the QA team (core and non core). This is to prevent that the addition of new members is done even though there is a considerable amount of opposition, as this could lead to internal quarrels which could result in reducing the QA teams ability to efficiently address QA issues. Removing a member from either group requires a 2/3 majority as well.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
For casual helpers the QA mailing list will of course remain open.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
All members of the QA team (core and non core) are eligible to participate in QA team votes.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Any member that leaves the QA team loses all his special karma which he may have received due to his membership. If any member of the core QA team leaves and as a result a time zone gets under staffed, QA should actively try to find a replacement.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
     &lt;strong&gt;Notes:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
When voting for a new member voters must be sure that the person has been helping with bug fixes in the past or has the potentials to help with that.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;&lt;strong&gt;Voting:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
All votes (except membership related votes; see above) require a simple 50% majority. Any member of the QA team may call for a vote at any time. All voting is done on the QA mailinglist.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The core team may overrule any decision (this includes votes on memberships) of the QA team and may decide to hold their own internal vote to make the ultimate decision on how to proceed. Furthermore, the core QA team may also hold votes without even consulting the QA team. However this should be only done in rare cases. All members of the core QA team may make decision on their own if a decision is time critical (like pulling a broken release). However the core QA team should be aware that making too many decisions on their own may lead to alienating the other members and therefore if possible it should always be attempted to at least consult other members of the team.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;&lt;strong&gt;QA rights/responsibilities:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Fixing bugs/making releases&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
If any QA related issues are found in a package that QA has not been granted permission to change without consulting the maintainer,the QA team will file a bug report. If the issue remains unresolved for 1 month (2+1+1 weeks; see below), QA may fix it themselves. &lt;br /&gt;&lt;br /&gt;
If the issue isn't fixed with in two weeks QA will email the maintainers about the issue (if the bug system won't have auto bug report notices every X week in the future) and if the problem isn't fixed within one week from that, QA will send yet another email to the maintainers and if no answer nor fix to the problem is provided within one week, all members of the core QA team will get the permission to modify any file needed to fix that QA issue as well as make a new release.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
If any major QA issues are found in any package and the QA team doesn't have permission to change that package without contacting the lead first then the QA team will file a bug report. Any major issues can stay open for 2 weeks (5+5+4 days; see below), QA may fix it themselves.&lt;br /&gt;&lt;br /&gt;
If the issue isn't fixed within 5 days QA will email the maintainers about the issue (if the bug system won't have auto bug report notices every X week in the future) and if the problem isn't fixed with in 5 days, from that QA will send yet another email to the maintainers and if no answer nor fix to the problem is provided with in 4 days, all members of the core QA team will have permission to modify any file needed to fix that QA issue as well as make a new release.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The same time frames apply when the QA team want to make a release because of unreleased fixes/improvements which are only available via CVS, or when the QA team wants to determine if a package has been orphaned (using the time frames specified for non major issues).&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The QA team can decide what are major issues after discussion on the QA Mailing-list.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The QA team will for this reason keep track of those QA issues in their pear web subsection. This would only be for having overview over which package maintainers need to be emailed for reminders and such things.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Orphaned Packages&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
The QA team can use the above stated rules to determine if a package is orphaned. The core QA team gets lead rights on all orphaned packages until the original maintainer returns or a new maintainer is found.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Deleting Package releases&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
The core QA team also has the permission to delete any release that might have any issues that have been found after the release, to reduce the effects of the problem. This right must be exercised with caution.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Package maintainers can also grant QA the rights to make a releases for their packages.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;&lt;strong&gt;pearweb QA subsection&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
It seems that there is a lack of QA material in the manual that people agree on and there is also need to make it move visible for people so they will actually follow those rules/guidelines. The QA team will therefore get its own QA subsection in the manual and will have control over it just like package maintainer controls package related docs in the manual. The QA team also gets its own subsection on pearweb so people can more easily access QA material which is too dynamic or just related to the QA team own internal documentation purposes. There the QA will, for example, publish their latest decisions. Furthermore here the QA team will be able to provide interfaces to QA team services. For example, here the QA team could offer an interface for maintainers to configure the access rights they want to grant the QA. Finally the core QA team can add QA related notes to each package homepage to communicate QA related information to the user base.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Approving first stable release&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
The QA team needs to approve the first stable release of any major version. For this purpose maintainers upload the release to PEAR web&lt;br /&gt;&lt;br /&gt;
and contact the QA team with a link to the release, then QA will decide if the release is ready or not. The core QA team will at this point approve the release through PEAR web and release it for the maintainer.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
The QA team must always inform the current lead maintainers of any changes that are done to a given package using the currently configured email addresses on pear web.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The core QA team may delegate tasks as much as possible to other QA team members. However no access rights will be assigned just for the sake of delegating a task (so members of the QA team may package a new release, but only members of the core QA team will have the necessary rights to upload the release).&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;Summary of the solution&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
     QA core group access rights:&lt;br /&gt;&lt;br /&gt;
       &lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Max 7 core members that get the core-QA-karma.&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   the core QA team will get more permission to fix issues and make release of packages if reported problems are not fixed in a specific time frame&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   the core QA team assumes lead over orphaned packages&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   the core QA team gets the rights to delete releases of packages if it determines that the release has severe issues&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   the QA team is allowed to add QA related notes to package homepages&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   QA team needs to approve an first stable release for a given major version number (done by votes)&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   the entire QA team will identify QA problems, will help writing QA related documents, will help people resolve their QA problems and such things&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   More focus is needed on writing QA related things in the manual and make then more visible&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Make a little QA corner at pear.php.net so QA is more visible for people and package devs are more aware of the QA team and how it works.&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   keep track of what QA does regarding packages that QA doesn't have permission to edit through a wiki of some sort&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Actions Required if accepted.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
-----------------------------&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Forming of the QA team, electing the persons who should for the core of the QA team.&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Giving the core dudes full CVS karma on the pear CVS module, as well as full access rights to package management part of pear web&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Make that little QA pear page&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Improve the QA manual pages&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Discovering which packages' lead(s) allow QA to help keeping their package QA approved&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Better coordination of the work which is done, who is going to do what. Know in advance who is going to write some more entries to the manual and so on.&lt;br /&gt;&lt;br /&gt;
         &lt;/li&gt;&lt;li&gt;   Make a wiki page of some sort for the info tracking regarding QA editing package that QA doesn't have permission to edit.&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;Change log&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
----------&lt;br /&gt;&lt;br /&gt;
Initial Release : 24 March 2004&lt;br /&gt;&lt;br /&gt;
Revision 1 : 26 March 2004&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; Fixed some typos (left summarize since Alan did it that way so I can't see anything *wrong* with it)&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added Lukas as author&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added in &amp;quot;Issue&amp;quot; about pear group&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added that more discussion is needed about core size&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added about if member leaves the team&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added small side note what the term Karma means in this RFC.&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added regarding new member in the QA team.&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; No voting for pulling releases&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; How the initial members are chosen.&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; Changed name of section QA core group access right to QA rights/responsibilities&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; Made better sub sections for readability in QA rights/responsibilities&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; added how Orphaned Packages will be handled&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; More specific about Deleting Package releases&lt;br /&gt;&lt;br /&gt;
   &lt;/li&gt;&lt;li&gt; Reworked the wording of things in many places&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
Revision 2: 26 April&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;    &lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Forgot to add the date of revision 1 ;/&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Spelling and grammar corrections provided by Klaus :)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Boosted core size to 7.&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Changed the time frame regarding packages that haven't allowed QA to modify.&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Changed how things are handled around first stable release&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:12pt&quot;&gt;Comments&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
----------&lt;br /&gt;&lt;br /&gt;
Klaus Guenther: Wants to boost up the core size to 10-15 members so the team can always react to any situation more quickly see &lt;a href=&quot;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26756&quot;&gt;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26756&lt;/a&gt; for more details.&lt;br /&gt;&lt;br /&gt;
Also mentions that there is needed some clarification on what happens when a core member leaves the team, and that voting needs some time frame.&lt;br /&gt;&lt;br /&gt;
Feels that QA could make use of PEPr for sending out emails to maintainers about bug reports and such.&lt;br /&gt;&lt;br /&gt;
For Rev. 1 Klaus came with some ideas how orphan packages should&lt;br /&gt;&lt;br /&gt;
be handled on the pear web.&lt;br /&gt;&lt;br /&gt;
&amp;quot;That will require a new global maintainer: &amp;quot;PEAR QA&amp;quot;, which would be merely a pseudo user. .......&amp;quot;&lt;br /&gt;&lt;br /&gt;
(We leave the implementation details for a more advanced rights management solution to the pearweb team)&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Alexey Borzov: Is against the core of QA, everything should be done in volunteer (isn't pear all about that?) also dislikes the voting idea, thinks person should only be accepted if he provides many quality bug fixes. packages should not be deleted if the case isn't extreme, if minor issue then down grade it's state.&lt;br /&gt;&lt;br /&gt;
His entire comments can be read here &lt;a href=&quot;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26757&quot;&gt;http://news.php.net/article.php?group=php.pear.dev&amp;amp;article=26757&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Daniel Convissor: Feels that time frame allowed for packages that haven't given QA the rights to modify them, be to long (Was fixed in Revision 2 )
 </content:encoded>
 <dc:date>2004-04-26T13:28:16-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=14">
 <title>PEPr Proposal [14]: Database::DB_Table</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=14</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Database::DB_Table&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/pmjones&quot;&gt;Paul Jones&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:18pt&quot;&gt;Proposal: DB_Table&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Recent Changes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table now supports HTML_QuickForm rules for elements derived from table columns, and supports setting of default values for QuickForm elements.  Documentation for these is also complete.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Except for (1) automated discovery of existing table definitions, and (2) automated alteration of tables to match the class table definitions, DB_Table is now feature-complete.  I expect to move it to beta, unless serious bug reports come in.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Overview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table is a wrapper for DB that acts as an interface to an SQL table, providing automated table creation, predefined and automated select views, automated insert and validation of inserted data, automated update and validation of updated data, automated form creation based ont eh table columns definitions through HTML_QuickForm, and a form of data type abstraction that forces the database to store date and time data as strings in ISO format.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The main benefit of DB_Table is that a developer can, with one file, distribute a table interface class that creates the table automatically and validates all data going into the table, regardless of the database backend, and creates input forms based on the table columns.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
See the &lt;strong&gt;complete&lt;/strong&gt; user-documentation, which includes extensive examples and explanations (much more than is covered in this proposal) &lt;a href=&quot;http://wiki.ciaweb.net/yawiki/index.php?wiki=DB_Table&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
See the source code for DB_Table &lt;a href=&quot;http://wiki.ciaweb.net/yawiki/index.php?wiki=DB_Table&amp;amp;page=SourceCode&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Apology In Advance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Not to beat a dead horse, but this proposal is a new cover for a revised version of &lt;a href=&quot;http://marc.theaimsgroup.com/?t=106763406600003&amp;amp;r=1&amp;amp;w=2&quot;&gt;DB_Simple&lt;/a&gt;.  Recall that there was no vote on DB_Simple, so although the three commentors were in the negative, it was not rejected. &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The recent talk of the &lt;a href=&quot;http://marc.theaimsgroup.com/?t=107211096800005&amp;amp;r=1&amp;amp;w=2&quot;&gt;DB_OO&lt;/a&gt; class and the &lt;a href=&quot;http://marc.theaimsgroup.com/?l=pear-dev&amp;amp;m=107273216632616&amp;amp;w=2&quot;&gt;Propel/Creole&lt;/a&gt; project leads me to believe that others like myself are unsatisfied with DB_DataObject, MDB, et. al.  While they are fine classes, they are not well-suited to my needs, and the fact that others are proposing code similar to DB_Table makes me think that it could be a useful addition to PEAR.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
I have gone over the old DB_Simple thread and I think I have addressed some of the concerns there.  Lukas, Alexey, and Alan were the main detractors of DB_Simple; perhaps the intervening time and the similar proposals will cause them to think differently about allowing DB_Table into PEAR.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
I would prefer for DB_Table to be in the DB package, rather than a package of its own.  In line with that preference, I have contacted Daniel Convissor (lead for DB) numerous times over the past few weeks, but he has been unable or unwilling to assess DB_Table as yet.  As such, I cannot say one way or another if he will accept it into DB, so I will continue to maintain this proposal.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table is a wrapper for DB (which abstracts API calls to databases) that provides MDB-like capabilities, especially as regards data type abstraction.  It is not a data object class, it is a table interface.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Among other things, DB_Table provides:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; Complete end-user documentation as well as inline comments.&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; A constructor that takes an existing DB object, so you can re-use the same connection object for multiple tables&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; API abstraction through DB&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; data type abstraction by avoiding and extending native SQL data types for date and time&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; an in-class column definition system (no external config file required, which significantly eases extension and distribution of classes based on DB_Table)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; an in-class index definition system (no external config file required)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; an in-class HTML_QuickForm definition system for form elements based on column definitions (no external config file required)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; automated table creation (based on the defined columns and indexes) at object instantiation time; this means no need for a separate table-creation script&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; an in-class &amp;quot;view&amp;quot; (i.e., predefined SELECT) system (no external config file)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; automated insert and update based on associative arrays (as per DB::autoExecute) &lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; automated validation of insert/update data on a by-column basis at insert/update time&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; automated creation of HTML_QuickForm objects based on the table column definitions&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; easy-to-understand configuration options using class property arrays&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; clean-running (no notices under E_ALL) and well-commented code compatible with both PHP4 and PHP5&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table is &lt;strong&gt;not&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; a competitor for DB_DataObject; it only acts as a table manipulation (create/insert/update/delete) and reading (select/view) device, not as a data encapsulator&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; a code generator; you extend DB_Table yourself and define columns, indexes, and views inside the extended object&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; supported for all PHP databases; only fbsql, mssql, mysql, oci8, pgsql, oci8, and sqlite are available at this time&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; a replacement for MDB or DB_DataObject, although it walks a similar path.&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Why Not Use (or Contribute To) Package X Instead?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB:  DB_Table extends (technically, it wraps) DB.  I'd be happy to have DB_Table become a part of the DB package if only Daniel Convissor can take time to assess it for inclusion.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
(M)DB_DataObject: Until recently only supported INT and STR types (&lt;em&gt;update: Alan notes that it now supports DATE, DATETIME, TIME, MYSQLTIMESTAMP, but still no FLOATs&lt;/em&gt;), not as easy to get started with, it auto-generates classes (&lt;em&gt;update: Alan notes that this is now optional&lt;/em&gt;).  Goes at things exactly backwards from the way I (and apparently others) like to proceed.  It uses the class to generate a .ini file, not the other way around.  Similarly, the createTables script only creates from a .ini file, not from the table() and keys() setup methods.  In short, its philosophy is quite different from DB_Table.  This is not bad, just not my preferred way of doing things.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_QueryTool: no easy way to just &amp;quot;type in&amp;quot; the baseline query elements, it uses its own update() and insert() code (not extended from DB), lacking end-user documentation.  Seems to be going for programmatic SQL generation.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
MDB: Overly complex, very heavy, user documentation is lacking, is more of an alternative to DB (as a database interface) than a table interface proper.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
MDB2: Less complex than MDB, but as with MDB, is more of an alternative to DB (as a database interface) than a table interface proper. &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Schema: It doesn't exist; or rather, it exists only as a thought in the minds of some developers.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Data Types&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Similar to MDB, DB_Table abstracts a number of data types, defined as&lt;br /&gt;&lt;br /&gt;
constants within the class:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_STRING: variable-length string, typically VARCHAR, up to 255 characters&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_SMALLINT, _INTEGER, and _BIGINT: 2-, 4-, and 8-byte integers, respectively&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_DECIMAL: fixed-point decimal value, typically DECIMAL or NUMBER&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_SINGLE: single-precision floating-point number, typically FLOAT&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_DOUBLE: double-precision floating-point number, typically REAL&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_DATE: ISO standard date, &amp;quot;yyyy-mm-dd&amp;quot; *&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_TIME: ISO standard time, &amp;quot;hh:ii:ss&amp;quot; *&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_DATETIME: ISO standard date and time, &amp;quot;yyyy-mm-dd hh:ii:ss&amp;quot; *&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_UNIXTIME: 32-bit Unix Timestamp +&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_COL_CLOB: a character large-object, typically LONGTEXT or CLOB&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
* Forces the database to store as a string.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
+ Forces the database to store as a 4-byte signed integer.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Note that instead of attempting to maintain and convert database-native dates and times, DB_Table uses string data types to represent those kinds of data, thus forcing every supported database to store the information in a known recognized format.  This is different from MDB, which uses the database-native storage format and attempts to convert back-and-forth between the MDB data type and the database native type.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This &amp;quot;forcing of type storage&amp;quot; allows very easy portability between database servers; you do not need to convert your query terms to the database native format, you can just write them the way you know the database will store your data (because DB_Table is forcing it to be stored that way).  Yes, you lose a lot of power that individual database back-ends may provide vis-a-vis their own data types; but then, if you are custom-writing your app for a specific RDBMS, you're probably not going to be able to port those database-specific abilities anyway.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The benefit of the &amp;quot;forced storage&amp;quot; in DB_Table is that when composing a WHERE clause, you do not need to know the native format of the SQL data type; you use a known standard format for dates and times.  No conversion of types is necessary; the data is already in the table in a known format.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The drawback is that the database engine does not &amp;quot;know&amp;quot; that (for example) a DB_TABLE_DATE field is actually a date, because it is stored as a string. However, this should only present problems when using native SQL calculations (e.g., YEAR(date_field) or HOUR(time_field)).&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This is one of the primary conceits of DB_Table:  that you can force the database to store things the way you want them to be stored, thus avoiding the need to convert back-and-forth between native database types when moving from one RDBMS to another.  (C.f. the comments from the SQLite guys on their implementation as well.)&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Index Types&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Also similar to MDB, DB_Table abstracts index creation, defined as constants within the class:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_IDX_NORMAL&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_IDX_UNIQUE&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Column Definition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To support automated table creation, automated SQL generation, and automated validation of insert/update, DB_Table requires that you define your table columns in advance, using the DB_Table $col property.  Here is an example column definition:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;br /&gt;
$this-&amp;gt;col['id'] = array(&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_TYPE    =&amp;gt; DB_TABLE_COL_INTEGER,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_REQUIRE =&amp;gt; true&lt;br /&gt;&lt;br /&gt;
);&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
That will define a table field for the DB_Table class called 'id'; DB_Table recognizes that the column contains unsigned integers,  and that values for this column are not allowed to be null.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Here is another example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;br /&gt;
$this-&amp;gt;col['cost'] = array(&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_TYPE    =&amp;gt; DB_TABLE_COL_DECIMAL,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_SIZE    =&amp;gt; 10,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_SCOPE   =&amp;gt; 2,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_DEFAULT =&amp;gt; &amp;quot;'0.00'&amp;quot;&lt;br /&gt;&lt;br /&gt;
);&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
That will define a table field for the DB_Table object called 'cost'; DB_Table recognizes that the column is a fixed-point decimal 10 digits long with 2 places for the decimal portion, defaults to a value of '0.00', is allowed to be null, and has no index.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Automated CREATE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
When you call the DB_Table constructor, you can ask it to set up the table (based on the column and index maps).  Just pass the proper flag to the constructor:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_CREATE_SAFE: Creates a table only if it does not exist in the database&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;li&gt; DB_TABLE_CREATE_DROP: Drops an existing version of the table and re-creates it&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Automated SELECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To support automated SELECT statements via select() and selectResult(), DB_Table lets you define baseline SQL clause sets in the $sql property array. Here are some example view definitions:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;br /&gt;
$this-&amp;gt;sql['list'] = array(&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_SELECT =&amp;gt; 'id, username, email',&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_FROM   =&amp;gt; $this-&amp;gt;table,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_WHERE  =&amp;gt; &amp;quot;division = 'Information Technology'&amp;quot;,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_ORDER  =&amp;gt; &amp;quot;username&amp;quot;,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_GET    =&amp;gt; DB_TABLE_GET_ALL&lt;br /&gt;&lt;br /&gt;
);&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
$this-&amp;gt;sql['item'] = array(&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_SELECT =&amp;gt; '*',&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_FROM   =&amp;gt; $this-&amp;gt;table,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_SQL_WHERE  =&amp;gt; &amp;quot;division = 'Information Technology'&amp;quot;,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_GET    =&amp;gt; DB_TABLE_GET_ROW&lt;br /&gt;&lt;br /&gt;
);&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
When the select('list') or select('item') method is called, DB_Table will build an SQL select statement from these clauses and return the row results as an array.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
When selectResult() is called instead of select(), DB_Table will return the results as DB_Result object.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table supports GROUP BY, HAVING, and JOIN clauses as well.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The select() and selectResult() methods allow for ad-hoc filters, ordering, and limits.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Automated INSERT and UPDATE With Validation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table uses DB::autoExecute() in its insert() and update() methods, which means all you need to do to insert or update table rows is pass an associative array where the key is a field name and the value is the field value.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
In addition, because the DB_Table instance has a defined column map, it knows what to expect from every field.  Thus, it can pre-validate all INSERT and UPDATE values to make sure they match the column requirements (data type, size, decimal places, not-null, and so on) before attempting to connect to the database.  This also allows developers to add customized validations for insert and update calls.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table does not need to convert back and forth from database-native data types, because all data is stored in a format consistent with the DB_Table data type (e.g., DB_TABLE_DATETIME is always in &amp;quot;yyyy-mm-dd hh:ii:ss&amp;quot; format in the table, and attempting to insert or update with a value not conforming to that format will fail validation).  Likewise, if a column is defined as DB_TABLE_NOTNULL, you cannot insert a null value (or update to a null value).&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Automated Form Generation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table can generate HTML_QuickForm elements based on the column defintions with DB_Table::getForm().  This makes getting initial application developent very fast, as you don't need to code your form pages by hand.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The default form elements are very generic, so DB_Table allows you to specify HTML_QuickForm options inside the column defintions, thus ensuring that form fields are presented to the user in a consistent manner.  For example, to define a column and add HTML_QuickForm element options:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;br /&gt;
$this-&amp;gt;col['gender'] = array(&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
    // column definition for the table&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_TYPE    =&amp;gt; DB_TABLE_COL_STRING,&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_COL_SIZE    =&amp;gt; 1,&lt;br /&gt;&lt;br /&gt;
    &lt;br /&gt;&lt;br /&gt;
    // form definition for HTML_QuickForm element&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_QF_LABEL    =&amp;gt; 'Your gender:',&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_QF_TYPE     =&amp;gt; 'select',&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_QF_VALS     =&amp;gt; array(&lt;br /&gt;&lt;br /&gt;
        'm' =&amp;gt; &amp;quot;Male&amp;quot;,&lt;br /&gt;&lt;br /&gt;
        'f' =&amp;gt; &amp;quot;Female&amp;quot;,&lt;br /&gt;&lt;br /&gt;
        'h' =&amp;gt; &amp;quot;Hermaphrodite&amp;quot;,&lt;br /&gt;&lt;br /&gt;
        'e' =&amp;gt; &amp;quot;Eunuch&amp;quot;&lt;br /&gt;&lt;br /&gt;
    ),&lt;br /&gt;&lt;br /&gt;
    DB_TABLE_QF_ATTRS    =&amp;gt; array('size' =&amp;gt; '4')&lt;br /&gt;&lt;br /&gt;
);&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table also supports setting default values for form elements, and supports HTML_QuickForm rules.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-size:14pt&quot;&gt;Known Issues&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table has only been tested with MySQL.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
DB_Table needs unit tests.
 </content:encoded>
 <dc:date>2004-01-01T20:32:35-05:00</dc:date>
</item>

</rdf:RDF>