• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Always start a particular service...

(10-02-2017, 06:27 AM)kilishan Wrote: Currently there is not a way to automatically load Services. Helpers are fairly simple to do since they don't have to be assigned to any specific variable within the class, but not so with Services. The way this was discussed internally, is that most of the time it would happen through a base controller that your other controllers extend from, or, if you needed it within many functions of the controller, you would grab an instance during __construct and assign it to a class property. This seemed like the best option, based on code we'd all seen where everything gets autoloaded for every controller in the application whether it's needed or not. That, and we didn't want to auto-assign class property names based on the service name since it may conflict with other stuff you're doing.

Thank you, this makes sense. I'll just make my own base controller and inherit from that.

Messages In This Thread
Always start a particular service... - by Tripex - 09-29-2017, 07:40 AM
RE: Always start a particular service... - by Tripex - 10-02-2017, 07:39 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.