On Sun, Apr 27, 2008 at 3:34 PM, alessandro cinelli <
[EMAIL PROTECTED]> wrote:
> 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
>
is it a dumb question?
O_O
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
-~----------~----~----~----~------~----~------~--~---