[FLOW3-general] @scope session
renst3 at e-rank.nl
renst3 at e-rank.nl
Sun Dec 27 15:30:47 CET 2009
Maybe good to mention:
I also tried creating a new instance using new \F3\Package\Test
instead of the injection..., this does not generate any errors, but
values don't seem to be preserved...
Quoting renst3 at e-rank.nl:
> I've a question about the @session scope. If I understood it right a
> class with the scope session is contained during the whole usersession.
> So, this seems the right scope for a 'usersession' object ;-)
>
> But, how should I use it?
>
> Whenever I use an object with the scope @session I get the error
> #1247211113: The session objects registry has not been injected
> correctly into the object manager.
>
> To make sure the class itself does not contain any errors I created a
> test class:
>
> <?php
> declare(ENCODING = 'utf-8');
> namespace F3\Package;
>
> /**
> * @scope session
> */
> class Test
> {
>
> }
> ?>
>
> And I try to inject the object into a controller using:
>
> /**
> * @var F3\Package\Test
> * @inject
> */
> protected $test;
>
> What am I doing wrong?
>
> With kind regards,
> Rens
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list