Hi,
i was studying symfony's code, especially how you can refer to the variable
$this->foo in the action and $foo in the view.
I found the code part that makes it possible:
sfPHPView.class.php line 92-109
$_escaping = $this->getEscaping();
if ($_escaping === false || $_escaping === 'bc')
{
extract($this->attributeHolder->getAll());
}
if ($_escaping !== false)
{
$sf_data = sfOutputEscaper::escape($this->getEscapingMethod(),
$this->attributeHolder->getAll());
if ($_escaping === 'both')
{
foreach ($sf_data as $_key => $_value)
{
${$_key} = $_value;
}
}
}
The question is: why if $_escape is false symfony uses the extract method
and not $$, and viceversa?
is there a specific reason?
thanks,
cirpo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---