Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

call function in different controller

Go to End



Community Member, 4 Posts

31 March 2012 at 3:22am

I'm new to Silverstripe and I'm trying to extend an existing site, so sorry if the answer to this question is obvious.
I'm trying to connect via TCP to an external device if an event happens.
I've made a controller for this which is in a different php file than the one in which the event happens.

Can I call my TCP connect function with something like controller::socketConnectController()?
Or do I have to redirect to the controller via a director::addrules?

Maybe the way I implement this is not rigth at all but this, is what I though would be a good solution.
I hope it is clear what I want :)