View Single Post
Old 05-17-2009, 09:01 PM   #9 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Salathe View Post
There is no requirement to declare object properties before using them but $bValidated is not a property anyway, just a regular variable.
Got it. So if the variable was created within the class scope, then it would be a class property. As it is, it's just a regular local variable within the method scope...

Quote:
Originally Posted by Salathe View Post
This is a little obscure concept if you've not seen it before: it uses the concept of variable functions. Say, for example, $szFunction had a value of 'foo' then the line would actually call $this->foo($szVariable);.
I didn't realize this at first. I am familiar with "variable variables", or some call it "indirect variables".

This is the first time I've seen it used for functions.
Very tricky....gotta keep an eye out for this in the future...

Quote:
Originally Posted by Salathe View Post
The value associated with the variable is not changed, the negation is only for the condition used for the if. It is just asking if $bValidated is false, if so return false.
I'll have to ponder on this a little bit. I understand that we are not changing the value, still confused about why (!) doesn't equate the variable to "true", if it was originally set as "false".

The way I am seeing it, (which is probably wrong) is this:

if(!false) return true;


Quote:
Originally Posted by Salathe View Post
No. Getter methods only provide an interface to accessing private (or protected) class members. This is just a regular, plain method—no special name.
Ok so getter and setter methods = access to class properties.



Here's what I have working so far. Obviously the layout is a quick hack....but it's functioning!

http://www.gatebattle.com/form.html

What I am going to try to do next is provide the error info next to each input element so you know what the actual error status is talking about, instead of just listing it.
allworknoplay is offline  
Reply With Quote