at the moment I'm looking for a way to call a method from a String. My String looks like this:
"Hello, here's the Link you look for: [[Link,internLink,Go,Login]]."
I'd like to replace [[Link,internLink,Go,Login]]
with:
K :: gI('Link')->internLink('Go', 'Login');
Is there a way? The reason is, that I got various texts saved in my Database and I need to call Methods within these texts. Also only the first to parameters (here: Link and internLink) always appear to be class and method. After those two parameters there might be from 0 - XXX parameters, depending on the method.I'm overstrained..
Edit: I tried to work with preg_replace but I'm open for a complete new way if necessary!