[TYPO3-mvc] settings within a repository?

Christine Gerpheide cgerpheide at gmail.com
Wed Aug 18 16:25:16 CEST 2010


2010/8/13 Bastian Waidelich <bastian at typo3.org>

> Sven Kalbhenn wrote:
>
> Hi Sven,
>
>
>  how can i get the settings (TSetup) within a repository?
>>
>
> You should not need settings in your repository. So - like Thomas - I'd be
> interested in what you're trying to achieve.
>
> Best,
> Bastian
>
> _
>


OK, I actually have a case where I also wonder about the best way to do use
settings in the repository:

I have an action that needs to retrieve an object whose data is stored in
web services, rather than the database (I retrieve XML describing the
entity, and create a new object and set each property with the value from
the XML).  Because I'm retrieving data and building an array/object, I would
like to make add the method to to do this inside of the repository.  The URL
for the web services, however, can change (depending on whether I want DEV
or Production services, for instance) and I would ideally have that stored
in some TS configuration.  I could pass the URL as an argument to my
repository method every time I make a call to the services, but it seems to
me that this argument is of a different nature than the other arguments for
those methods (such as a UID of the object to retrieve).

Is passing the argument still the best way to do this? To me it seems like
it would be best to have a separate TS configuration for storage that is
accessible by the Repository (such as the persistence configuration -- but
these settings aren't accessible from a repository correct?) Are there any
other ways to do this?

So, just to give an example of the case I just encountered,
Christine


More information about the TYPO3-project-typo3v4mvc mailing list