<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-27907958</id><updated>2011-12-14T19:09:11.020-08:00</updated><title type='text'>Databug</title><subtitle type='html'>Databug is a PHP class that is able to generate random user profiles with fictional yet realistic data.  It is especially useful for testing PHP scripts and applications under development.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-27907958.post-115553130952746728</id><published>2006-08-13T21:42:00.000-07:00</published><updated>2006-08-13T21:55:09.586-07:00</updated><title type='text'>Databug Accepted at phpclasses</title><content type='html'>Databug has been accepted at phpclasses.org!  The phpclasses listing includes a forum page:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.phpclasses.org/discuss/package/3287/"&gt;http://www.phpclasses.org/discuss/package/3287/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The source files can be found here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.phpclasses.org/browse/package/3287.html"&gt;http://www.phpclasses.org/browse/package/3287.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115553130952746728?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115553130952746728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115553130952746728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115553130952746728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115553130952746728'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/08/databug-accepted-at-phpclasses.html' title='Databug Accepted at phpclasses'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115510283949107468</id><published>2006-08-08T22:29:00.000-07:00</published><updated>2006-08-08T22:53:59.506-07:00</updated><title type='text'>New Demo Page</title><content type='html'>It looks like the databug class will be appearing on phpclasses.org shortly (just a little issue with my profile photo that needed to be cleared up.)&lt;br /&gt;&lt;br /&gt;In anticipation, I've added a new demo page to klenwell.net:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://klenwell.net/databug/demo.php"&gt;php databug demo page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115510283949107468?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115510283949107468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115510283949107468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115510283949107468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115510283949107468'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/08/new-demo-page.html' title='New Demo Page'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115466191077252686</id><published>2006-08-04T08:24:00.000-07:00</published><updated>2006-08-08T22:55:34.210-07:00</updated><title type='text'>phpclasses Submission</title><content type='html'>Databug has been submitted to &lt;a href="http://www.phpclasses.org/browse/package/3287.html"&gt;phpclasses.org&lt;/a&gt; and awaits approval.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115466191077252686?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115466191077252686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115466191077252686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115466191077252686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115466191077252686'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/08/phpclasses-submission.html' title='phpclasses Submission'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115465938315443482</id><published>2006-08-03T19:08:00.000-07:00</published><updated>2006-08-03T19:43:03.156-07:00</updated><title type='text'>Google Hosting</title><content type='html'>A &lt;a href="http://code.google.com/p/databug/"&gt;project page for Databug&lt;/a&gt; has been added to &lt;a href="http://code.google.com/"&gt;the new Google Code project hosting site&lt;/a&gt;.  I've just uploaded &lt;a href="http://databug.googlecode.com/svn/trunk/"&gt;the latest version&lt;/a&gt; of databug.&lt;br /&gt;&lt;br /&gt;Databug will also be submitted to &lt;a href="http://www.phpclasses.org/"&gt;phpclasses.org&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115465938315443482?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115465938315443482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115465938315443482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115465938315443482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115465938315443482'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/08/google-hosting.html' title='Google Hosting'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115311745527550446</id><published>2006-07-16T23:21:00.000-07:00</published><updated>2006-07-16T23:24:15.283-07:00</updated><title type='text'>Added Street Name to Profile</title><content type='html'>Added a function to grab a random street name from a new data file.  Only viable file of street names I could find contained street names from Anchorage, Alaska.  For the most part, it doesn't really show.&lt;br /&gt;&lt;br /&gt;A demo:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; Othella&lt;br /&gt;    [last_name] =&gt; Finch&lt;br /&gt;    [user_name] =&gt; ofinch&lt;br /&gt;    [full_name] =&gt; Othella Finch&lt;br /&gt;    [gender] =&gt; f&lt;br /&gt;    [email] =&gt; ofinch49788@aol.com&lt;br /&gt;    [street] =&gt; Altoona Drive #654&lt;br /&gt;    [zip] =&gt; 91360&lt;br /&gt;    [city] =&gt; Thousand Oaks&lt;br /&gt;    [state] =&gt; CA&lt;br /&gt;    [phone] =&gt; (858) 555-9667&lt;br /&gt;)&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115311745527550446?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115311745527550446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115311745527550446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115311745527550446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115311745527550446'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/07/added-street-name-to-profile.html' title='Added Street Name to Profile'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115268494553053385</id><published>2006-07-11T23:08:00.000-07:00</published><updated>2006-07-11T23:19:16.576-07:00</updated><title type='text'>Method: _databug_thresh_file($fpath, $ratio_denominator=3)</title><content type='html'>I'm trying to make the class workable without a database because I'm lazy and find integrating them in my PHP scripts a bit of a nuisance and, well, I just find it tidier not to get MySQL involved sometimes.  &lt;br /&gt;&lt;br /&gt;There are a couple methods in the class for opening files and pulling data into an array.  Most involve some randomization of the result.  So I wrote this method to lighten the load.  The &lt;code&gt;$ratio_denominator&lt;/code&gt; argument indicates the ratio of lines (as in 1 in every &lt;code&gt;$ratio_denominator&lt;/code&gt; lines) that will be pulled into the array (i.e. the "threshing").  The same concept is used with &lt;code&gt;set_zip_data_randomly_by_range&lt;/code&gt; function.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt; /**&lt;br /&gt;  * @access private&lt;br /&gt;  * @return array&lt;br /&gt;  */&lt;br /&gt; function _databug_thresh_file($fpath, $ratio_denominator=3)&lt;br /&gt; {&lt;br /&gt;  // *** DATA&lt;br /&gt;  &lt;br /&gt;   # internal&lt;br /&gt;   $skip_token = '%';&lt;br /&gt;   $_d = $ratio_denominator;&lt;br /&gt;   $_i = 0;&lt;br /&gt;  &lt;br /&gt;     # return&lt;br /&gt;     $LINES = array();&lt;br /&gt;   &lt;br /&gt; &lt;br /&gt;  // *** MANIPULATE&lt;br /&gt;  &lt;br /&gt;     # sanity check&lt;br /&gt;     if ( !is_file($source_path) )&lt;br /&gt;     {&lt;br /&gt;       trigger_error("file [$source_path] not found", E_USER_WARNING);&lt;br /&gt;       return 0;&lt;br /&gt;     }&lt;br /&gt;    &lt;br /&gt;     # open file (for reading)&lt;br /&gt;     $_handle = @fopen($source_path, "r");&lt;br /&gt;   &lt;br /&gt;   # Set Mod Offset&lt;br /&gt;   $_mod_offset = mt_rand(0, $_d-1);&lt;br /&gt;    &lt;br /&gt;     # fetch file lines    &lt;br /&gt;     while ( !feof($_handle) )&lt;br /&gt;     {&lt;br /&gt;    $_i++;&lt;br /&gt;    if ( $_i % $_d &lt;&gt; $_mod_offset )&lt;br /&gt;    {&lt;br /&gt;     continue;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;       $_buffer = fgets($_handle, 4096);&lt;br /&gt;       $_line = trim($_buffer);&lt;br /&gt;      &lt;br /&gt;       # check for skip token&lt;br /&gt;       if ( substr($_line,0,1) &lt;&gt; $skip_token &amp;&amp; !empty($_line) )&lt;br /&gt;       {&lt;br /&gt;         $LINES[] = $_line;&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt;    &lt;br /&gt;     # close file&lt;br /&gt;     fclose($_handle);&lt;br /&gt;    &lt;br /&gt;     # DEBUG&lt;br /&gt;     #print_r($LINES);&lt;br /&gt;    &lt;br /&gt;     # catch&lt;br /&gt;     if ( !count($LINES) )&lt;br /&gt;     {&lt;br /&gt;       trigger_error('no lines found', E_USER_WARNING);&lt;br /&gt;     }&lt;br /&gt;     elseif ( count($LINES) == 1 )&lt;br /&gt;     {&lt;br /&gt;       trigger_error('only 1 line fetched -&gt; check EOL delimiter', E_USER_NOTICE);&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;  // *** RETURN&lt;br /&gt;  &lt;br /&gt;     return $LINES;&lt;br /&gt; }&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115268494553053385?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115268494553053385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115268494553053385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115268494553053385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115268494553053385'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/07/method-databugthreshfilefpath.html' title='Method: _databug_thresh_file($fpath, $ratio_denominator=3)'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115234074035914979</id><published>2006-07-07T23:37:00.000-07:00</published><updated>2006-07-07T23:39:00.366-07:00</updated><title type='text'>Waldo Kent from Cleveland, OH</title><content type='html'>Doing a little more work on Databug.&lt;br /&gt;&lt;br /&gt;Test case: Clark Kent's underachieving cousin.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; Waldo&lt;br /&gt;    [last_name] =&gt; Kent&lt;br /&gt;    [user_name] =&gt; wkent&lt;br /&gt;    [full_name] =&gt; Waldo Kent&lt;br /&gt;    [gender] =&gt; m&lt;br /&gt;    [email] =&gt; wkent12609@sbcglobal.net&lt;br /&gt;    [zip] =&gt; 44110&lt;br /&gt;    [city] =&gt; Cleveland&lt;br /&gt;    [state] =&gt; OH&lt;br /&gt;    [phone] =&gt; (212) 555-0080&lt;br /&gt;)&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115234074035914979?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115234074035914979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115234074035914979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115234074035914979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115234074035914979'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/07/waldo-kent-from-cleveland-oh.html' title='Waldo Kent from Cleveland, OH'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-115043920334445235</id><published>2006-06-15T23:26:00.000-07:00</published><updated>2006-06-15T23:28:18.270-07:00</updated><title type='text'>Barnaby Barfield from Baton Rouge</title><content type='html'>&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; Barnaby&lt;br /&gt;    [last_name] =&gt; Barfield&lt;br /&gt;    [user_name] =&gt; bbarfield&lt;br /&gt;    [full_name] =&gt; Barnaby Barfield&lt;br /&gt;    [gender] =&gt; m&lt;br /&gt;    [email] =&gt; bbarfield43445@sbcglobal.net&lt;br /&gt;    [zip] =&gt; 70808&lt;br /&gt;    [city] =&gt; Baton Rouge&lt;br /&gt;    [state] =&gt; LA&lt;br /&gt;    [phone] =&gt; (985) 555-4133&lt;br /&gt;    [fav_color] =&gt; &lt;span style="color:#fb59c1"&gt;#fb59c1&lt;/span&gt;&lt;br /&gt;)&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-115043920334445235?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/115043920334445235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=115043920334445235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115043920334445235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/115043920334445235'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/06/barnaby-barfield-from-baton-rouge.html' title='Barnaby Barfield from Baton Rouge'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-114810620170287825</id><published>2006-05-19T23:22:00.000-07:00</published><updated>2006-05-19T23:26:42.180-07:00</updated><title type='text'>Latest Demo</title><content type='html'>Added a random color function:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; Sly&lt;br /&gt;    [last_name] =&gt; Eller&lt;br /&gt;    [user_name] =&gt; seller&lt;br /&gt;    [full_name] =&gt; Sly Eller&lt;br /&gt;    [gender] =&gt; m&lt;br /&gt;    [email] =&gt; seller73003@hotmail.com&lt;br /&gt;    [zip] =&gt; 19026&lt;br /&gt;    [city] =&gt; Pilgrim Gardens&lt;br /&gt;    [state] =&gt; PA&lt;br /&gt;    [phone] =&gt; (484) 555-0109&lt;br /&gt;    [fav_color] =&gt; &lt;span style="color:#9d61af"&gt;#9d61af&lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Script:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;$User = new Databug();&lt;br /&gt;$User-&gt;fav_color= $User-&gt;get_random_color();&lt;br /&gt;$DATA = $User-&gt;get_data();&lt;br /&gt;$DATA['fav_color'] = $User-&gt;fav_color;&lt;br /&gt;print_r($DATA);&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-114810620170287825?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/114810620170287825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=114810620170287825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114810620170287825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114810620170287825'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/05/latest-demo.html' title='Latest Demo'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-114809850367135334</id><published>2006-05-19T21:07:00.000-07:00</published><updated>2006-05-19T23:28:30.056-07:00</updated><title type='text'>phpDocumentor Commenting Style</title><content type='html'>I'm a vigil (somewhat anal) commentor.  A good part of the art in coding for me rests with neat, well formatted, and consistent comments.  Over the last couple years I've developed my own style, idiosyncratic perhaps, but neatly formatted and easy to pick up at a glance.  (You can see examples of it on my &lt;a href="http://phosphorusandlime.blogspot.com/"&gt;design blog&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;For the sake of this project, however, I am making a concerted effort to use the phpDocumentor style.  I'm slowly getting the hang of it.  There is extensive online documentation, but I'd trade it all for one complete demo file.  (I must have someone on my drive somewhere.)&lt;br /&gt;&lt;br /&gt;phpDocumentor organizes comments around &lt;a href="http://manual.phpdoc.org/HTMLSmartyConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock"&gt;DocBlocks&lt;/a&gt;.  For a class, I count four key DocBlocks.&lt;br /&gt;&lt;br /&gt;1. The Page Block&lt;br /&gt;&lt;div class="code"&gt;/**&lt;br /&gt; * Package PackageName&lt;br /&gt; * desciption of package here -- &lt;br /&gt; *&lt;br /&gt; * @package PackageName&lt;br /&gt; * @author Name &lt;address@email.tld&gt;&lt;br /&gt; */&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;2. The Class Block&lt;br /&gt;&lt;div class="code"&gt;/**&lt;br /&gt; * Class ClassName&lt;br /&gt; *&lt;br /&gt; * NOTES&lt;br /&gt; *  notes here&lt;br /&gt; *&lt;br /&gt; * @package PackageName&lt;br /&gt; * @author Name &lt;address@email.tld&gt;&lt;br /&gt; * @version&lt;br /&gt; */&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;3. The Variable Block&lt;br /&gt;&lt;div class="code"&gt;/**&lt;br /&gt; * @access public&lt;br /&gt; * @var string&lt;br /&gt; */&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;4. The Method Block&lt;br /&gt;&lt;div class="code"&gt;/**&lt;br /&gt; * Short description of method&lt;br /&gt; * Usage: $result = $_O['data_obj']-&gt;Method($string, $integer, $float, $ARRAY);&lt;br /&gt; * &lt;br /&gt; * @access public/private&lt;br /&gt; * @param string $string&lt;br /&gt; * @param integer $integer &lt;br /&gt; * @param float $float&lt;br /&gt; * @param array $ARRAY&lt;br /&gt; * @return string $return&lt;br /&gt; */&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-114809850367135334?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/114809850367135334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=114809850367135334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114809850367135334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114809850367135334'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/05/phpdocumentor-commenting-style.html' title='phpDocumentor Commenting Style'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-114802187253191812</id><published>2006-05-18T23:51:00.000-07:00</published><updated>2006-05-19T00:00:45.333-07:00</updated><title type='text'>Zip Code and Phone Methods</title><content type='html'>I've added methods to generate a random city, state, and zip pulled from a flat file I adapted from &lt;a href="http://www.census.gov/tiger/tms/gazetteer/zip90r.txt"&gt;US census data&lt;/a&gt;.  I also have a flat file of select US area codes, useful for generating phone numbers.  The area code list includes values for the second three phone number digits (what's the word for that?), but I have a 'safe' flag that automatically sets this to '555' to help avoid publishing real phone numbers.&lt;br /&gt;&lt;br /&gt;Both methods can be keyed to state and thus can be coordinated for greater verisimilitude.  I have a function somewhere for generating a street name (using the last name database).  I'll have to integrate that in order to generate a full street address.&lt;br /&gt;&lt;br /&gt;A sample generated data array:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; averil&lt;br /&gt;    [last_name] =&gt; malcolm&lt;br /&gt;    [user_name] =&gt; amalcolm&lt;br /&gt;    [full_name] =&gt; averil malcolm&lt;br /&gt;    [gender] =&gt; f&lt;br /&gt;    [email] =&gt; amalcolm11041@sbcglobal.net&lt;br /&gt;    [zip] =&gt; 38018&lt;br /&gt;    [city] =&gt; Cordova&lt;br /&gt;    [state] =&gt; TN&lt;br /&gt;    [phone] =&gt; (901) 555-6329&lt;br /&gt;)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-114802187253191812?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/114802187253191812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=114802187253191812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114802187253191812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114802187253191812'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/05/zip-code-and-phone-methods.html' title='Zip Code and Phone Methods'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-114732874114736579</id><published>2006-05-10T23:24:00.000-07:00</published><updated>2006-05-10T23:31:51.846-07:00</updated><title type='text'>Simple Demonstration</title><content type='html'>Array created by databug object:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;Array&lt;br /&gt;(&lt;br /&gt;    [first_name] =&gt; waylin&lt;br /&gt;    [last_name] =&gt; byron&lt;br /&gt;    [user_name] =&gt; wbyron&lt;br /&gt;    [full_name] =&gt; waylin byron&lt;br /&gt;    [gender] =&gt; 2&lt;br /&gt;    [email] =&gt; wbyron_7bd2@hotmail.com&lt;br /&gt;)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-114732874114736579?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/114732874114736579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=114732874114736579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114732874114736579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114732874114736579'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/05/simple-demonstration.html' title='Simple Demonstration'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27907958.post-114732629093153905</id><published>2006-05-10T21:58:00.000-07:00</published><updated>2006-05-10T23:19:51.196-07:00</updated><title type='text'>Databug Blog Established</title><content type='html'>Databug is a PHP class I've been working on.  It creates random user profiles.  Sounds lame, but I've found it useful for testing and haven't really seen anything like it.&lt;br /&gt;&lt;br /&gt;I'll publish the source code as soon as I've cleaned it up and made it presentable.  This blog will demonstrate its usage and may include some notes on its development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27907958-114732629093153905?l=databugger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://databugger.blogspot.com/feeds/114732629093153905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27907958&amp;postID=114732629093153905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114732629093153905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27907958/posts/default/114732629093153905'/><link rel='alternate' type='text/html' href='http://databugger.blogspot.com/2006/05/databug-blog-established.html' title='Databug Blog Established'/><author><name>klenwell</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://klenwell.googlepages.com/self.photocopy.jpg'/></author><thr:total>0</thr:total></entry></feed>
