Access extension component via URL

Hello.

My extension needs to send ajax POST request to controller action.

Currently, i have it solved with base Controller implementing the action i want to access via url.

The controller’s location is in components dir.

Is it possible, to move Controller to extensions/myextension directory, and still be able to call its actions? And is it not in conflict with MVC architecture??

Or is there any way to access a php script from extensions/myextension directory via URL?

Thanx in advance for every helpful answer,

Greetings

Smeto

You can override the actions() method inside the controller to specify an actionID that will load from an extension component class.