Welcome Guest, Not a member yet? Register   Sign In
SVN change : defining EXT
#5

[eluser]Colin Williams[/eluser]
Quote:why did the php file extention need to be defined in the first place :|
There are plenty of reasons. Don't you think if someone had some sort of requirement where they wanted a different extension, they'd scream bloody murder that CI locked them in. It's an example of constantly asking, "What happens if..." while developing, which everyone should do. "What happens if the server should only parse .phtml extensions through the PHP parser?" "What happens if users want to force CI to run as PHP 5, but not legacy code elsewhere, so they use a .php5 extension." Etc.

Quote:True but if you are going to set the constant with a string isn’t that a sign the constant isn’t really needed?

Well, the string should never change, therefore it's a constant. There is also the subject of "developer experience" to take into consideration. For instance, sometimes you would rather have something like

Code:
if ($_SESSION[USER_SESSION_FLAG] == USER_IS_AUTHENTICATED)
than just 'key' == TRUE/FALSE. It may be more verbose but it reads better and is self-documenting.


Messages In This Thread
SVN change : defining EXT - by El Forum - 07-03-2009, 07:34 AM
SVN change : defining EXT - by El Forum - 07-03-2009, 07:40 AM
SVN change : defining EXT - by El Forum - 07-03-2009, 07:55 AM
SVN change : defining EXT - by El Forum - 07-03-2009, 10:22 AM
SVN change : defining EXT - by El Forum - 07-03-2009, 11:57 AM
SVN change : defining EXT - by El Forum - 07-03-2009, 12:10 PM
SVN change : defining EXT - by El Forum - 07-03-2009, 12:44 PM
SVN change : defining EXT - by El Forum - 07-03-2009, 12:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB