PHP Classes

You have an inconsistency in the naming of: "Class.

Recommend this page to a friend!

      Easy Navigator  >  All threads  >  You have an inconsistency in the...  >  (Un) Subscribe thread alerts  
Subject:You have an inconsistency in the...
Summary:Package rating comment
Messages:2
Author:Garan
Date:2008-04-02 22:36:01
Update:2008-04-03 04:43:30
 

Garan rated this package as follows:

Utility: Good
Consistency: Good
Examples: Good

  1. You have an inconsistency in the...   Reply   Report abuse  
Picture of Garan Garan - 2008-04-02 22:36:01
You have an inconsistency in the naming of: "Class.EasyNavigator.php" with this package (there is also "EasyNavigator.Class.php").
Because of this, the zip files don't work without editing.
It would be good to correct this before more people download and try this code.
Otherwise, the code worked fine.

My only other suggestion is to include code which makes it easy to troubleshoot the code (so that it can be run from the command line).
A quick way to do this is:

function getHttpHost()
{
$host;
if( isset($_SERVER) && isset($_SERVER['HTTP_HOST']) )
{ $host = $_SERVER['HTTP_HOST']; }
else
{ $host = 'localhost'; }
return $host;
}

function getRequestUri()
{
$requestUri;
if( isset($_SERVER) && isset($_SERVER['REQUEST_URI']) )
{ $requestUri = $_SERVER['REQUEST_URI']; }
else
{ $requestUri = '/bogus/test/uri/from/getRequestUrl/didYouRunFromCommandLine/fileName.php'; }
return $requestUri;
}

Then (of course) use "getHttpHost()" instead of "$_SERVER['HTTP_HOST']"
and use "getRequestUri()" instead of "$_SERVER['REQUEST_URI']" .

Maybe this is a little overboard, yet helpful for debugging.

Of course, a class which can do this type of thing for all $_SERVER values would be nice. Hmmm....

-Garan

  2. Re: You have an inconsistency in the...   Reply   Report abuse  
Picture of Brandon Blincoe Brandon Blincoe - 2008-04-03 04:43:30 - In reply to message 1 from Garan
Garan,

Thank you for catching that. The issue has been fixed.

I do like your suggestion, and may consider doing something like that in a future version.

Thanks again,
Brandon