Ever since I discovered it, I use it on all my projects...even the
small ones. The reason I'm writing is that I'm in the process of
porting the class to VBScript. Why? Well, as much as I love PHP, 75%
of the projects I work on at my employer, Mastermind Internet Services
(www.mmind.net), requires ASP. For these projects I have to resolve to
embedded code, which I hate. Of course there are web classes, but I
think they suck. Anyway, I have ported ALL properties/methods over
except Parse and ParseTemplate.
My question is in the Parse function, there are a few lines of code I
don't quite understand. In order for me to finish writing the VBScript
port of this class, I need to understand what's going on here. Here's
the code I'm refering to:
$this->$val = $this->get_template($fileName);
}
}
// Array context implies overwrite
$this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS);
// For recursive calls.
$this->assign( array( $ReturnVar => $this->$ReturnVar ) );
I understand in PHP that when you reference a variable or function in a
class, you use the $this-> notation. However, in your class, this isn't
always the case. Why? For example, why do sometimes you call
$ReturnVar by itself, and other times like $this->$ReturnVar ? It must
be for a certain reason, because if I take the $this-> off, the class
fails.
Regards,
Jonathan Griffin