you should use knowledge about the internals of the framework.. maybe
someday symfony changes the way how it checks for the existance of a
session attribute and your code will stop working..

On 25 Sep., 14:38, "Bert-Jan" <[EMAIL PROTECTED]> wrote:
> > On 24 sep, 14:58, Sylvain <[EMAIL PROTECTED]> wrote:
> >> Hi !
>
> >> To create a session variable, we must do :
>
> >> $this->getUser()->setAttribute('test', 'plop');
>
> >> To remove it, we must do :
>
> >> $this->getUser()->getAttributeHolder()->remove('test');
>
> >> Why not have created sfUser::removeAttribute() method which be more
> >> coherent in relation with sfUser::setAttribute() :
>
> >> $this->getUser()->removeAttribute('test') ;
>
> >> Is there any technical reason ?
> > Same thing for sfBasicSecurityUser::addCredential() which accept
> > multiples arguments via func_get_args() and
> > sfBasicSecurityUser::removeCredential() only one.. It's not coherent..
> > Why not use array instead for all parameters ? (Fabien say 6 days ago
> > in this ML « Using array allows to have a clean API and allows to
> > dynamically create your plugin list »)
>
> > Best regards
>
> To remove a variable from the session you can also use
> $this->getUser()->setAttribute('test', null)
> The existence of the variables is checked with isset() which returns false
> on null variables.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to