[FLOW3-general] Designing the system

Søren Malling soren.malling at gmail.com
Mon Mar 14 01:55:23 CET 2011


Hi Dawid,

Yeps, that is what I mean :-)

I got a example from a (unfinised!) project, that you can find on github

https://github.com/sorenmalling/FLOW3-ArticleWorkflow/blob/master/Classes/Controller/LoginController.php

my LoginController doesn't have a model or repository.

Regards,

Maybe it helps you a bit more :-)

Søren Malling

TYPO3 Brugergruppe Danmark: www.typo3danmark.dk
Twitter: twitter.com/sorenmalling



On Sun, Mar 13, 2011 at 9:43 PM, Dawid Pacholczyk <dpacholczyk at gmail.com> wrote:
> On 13.03.2011 20:40, Søren Malling wrote:
>>
>> Hi Dawid,
>>
>> You can inject the repositories you need, into your controller
>>
>> /**
>>  * Some repo
>>  * @var \F3\App\Domain\Repository\SomeRepository
>>  * @inject
>>  */
>> protected $someRepository;
>>
>> and you will have that repository in your hands :-)
>>
>> I hope this helps
>>
>> Regards
>>
>> Søren Malling
>>
>> TYPO3 Brugergruppe Danmark: www.typo3danmark.dk
>> Twitter: twitter.com/sorenmalling
>>
>>
>>
>> On Sun, Mar 13, 2011 at 11:30 AM, Dawid Pacholczyk
>> <dpacholczyk at gmail.com>  wrote:
>>>
>>> Hello List,
>>>  I have a small problem. I`m trying to design some small application and
>>> I
>>> need a controller that is handling couple of system behaviours like login
>>> the user or checking the priviliges.
>>>
>>> This would be an object with out a Model...cause I won`t storage anything
>>> in
>>> DB. Now I know that this controller in some actions (like loging the
>>> user)
>>> need to make some checks in DB. How should I design this ?
>>>
>>> For example I have
>>>
>>> SystemController and should I create SystemRepository ? Is it proper for
>>> objects like this ?
>>>
>>> Best regards,
>>> Dawid Pacholczyk
>>> _______________________________________________
>>> FLOW3-general mailing list
>>> FLOW3-general at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>>>
>
> If I understand you correct I could do something like this -> I`m creating a
> SystemController with no Model or Repository. So when I need to - for
> example - log in a user I`m using DI for injecting UserRepository when I can
> control the posted data and log him to the system or refuse.
>
> Is this what you want to tell me ? :)
>
> Thanks for reply
>
> Best regards,
> Dawid Pacholczyk
> _______________________________________________
> 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