Welcome Guest, Not a member yet? Register   Sign In
Controller shared function
#11

[eluser]wiredesignz[/eluser]
Modular Extensions HMVC allows controllers to load and call other controllers.

I can't see what all the fuss is about. :lol:
#12

[eluser]Colin Williams[/eluser]
Quote:I’m looking for the best CI way

Actually, you should just be looking for the best way, period. "CI way" is kind of a useless approach, and this topic proves that. I would go with Darkwing Duck on this one (er, Rick Jolly, I mean)
#13

[eluser]Colin Williams[/eluser]
Quote:So basically what I wanna achieve is that the class Human can interact with the class Work.

As perverted as it may seem, Controllers are objects but their main and only role is to respond to the HTTP request. Objects in your case are more like traditional data-based objects. It might just require a shift in your thinking of what a controller is. What you are needing sounds more like Human models and Work models. No reason a Human controller can't interface with a Work model, and vice-versa.
#14

[eluser]xinq88[/eluser]
[quote author="wiredesignz" date="1222415417"]Modular Extensions HMVC allows controllers to load and call other controllers.

I can't see what all the fuss is about. :lol:[/quote]

Wow, if that's what I think it is, it's the solution for my whole problem.
I'll definitely try this one when I get home, unfortunately right now I'm not in the position to try this Sad.

Thx for your reaction!
#15

[eluser]Colin Williams[/eluser]
Yes, xinq88. Modular Extension HMVC will allow you to call other methods of different controllers. It has no problem doing this. But I think if you do this in the context of your approach (which, I might add, you haven't fully explained), it sounds like you will be using Controllers to model data. Controllers ought not model objects in this regard. It could be a perversion of a Controller's role. At least that's how I feel about it.

Controllers are not warehouses of similar functionality. They are the traffic controllers, the concierges.
#16

[eluser]xinq88[/eluser]
[quote author="Colin Williams" date="1222429523"]Yes, xinq88. Modular Extension HMVC will allow you to call other methods of different controllers. It has no problem doing this. But I think if you do this in the context of your approach (which, I might add, you haven't fully explained), it sounds like you will be using Controllers to model data. Controllers ought not model objects in this regard. It could be a perversion of a Controller's role. At least that's how I feel about it.

Controllers are not warehouses of similar functionality. They are the traffic controllers, the concierges.[/quote]

Yeah, today I talked discussed it with a college mate of me, and the result of that discussion was indeed that I'll probably need Models instead of controllers.

This was a very learning full thread to me though.
Thank you all for helping me out, and I'll definitely come back to this forum.




Theme © iAndrew 2016 - Forum software by © MyBB