php - Entities that are able to return own url -


I realized that such questions have been asked and answered, but bear with me because I am satisfactory in that reply Not found, I still do not see how to solve my problem I understand that "you should not do this" is fine, but did anyone help me understand this (in complete) simple task? Can do?

I have many organizations (I use that word for free, these principles are not, they are simply scratching data models that load data from external APIs). I have to get some of these organizations a getUrl () function, so that wherever I have encountered them, I can just call $ entity-getUrl () and use it to have a proper and consistent url.

Initially, I was creating these URL paths by hand, but then felt, "I should use the URL defined in the routing configuration to generate this. Then they are constantly site-wide Will guarantee ". That's why I search on these answers and I say that "your organizations should know nothing but other organizations" and "create a different service" OK, ok, but I still want to call a $ entity-> getUrl () method! Is it impossible to achieve and still follow basic principles? Can anyone explain to me how can I do it? Even if I am creating a separate service, even then I do not feel able to accomplish my goal, because "you should not use services from intermediaries".

What's the man to do? Can somebody help me out?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -