Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] r391 - in registry/trunk: app/Config app/Console/Command app/Controller app/Model app/Plugin app/Plugin/Grouper app/Plugin/Grouper/Config app/Plugin/Grouper/Lib app/Plugin/Grouper/Model app/Plugin/Grouper/Model/Datasource app/View/CoInvites lib/Cake/Model/Datasource

Subject: COmanage Developers List

List archive

Re: [comanage-dev] r391 - in registry/trunk: app/Config app/Console/Command app/Controller app/Model app/Plugin app/Plugin/Grouper app/Plugin/Grouper/Config app/Plugin/Grouper/Lib app/Plugin/Grouper/Model app/Plugin/Grouper/Model/Datasource app/View/CoInvites lib/Cake/Model/Datasource


Chronological Thread 
  • From: Benn Oshrin <>
  • To: Scott Koranda <>
  • Cc:
  • Subject: Re: [comanage-dev] r391 - in registry/trunk: app/Config app/Console/Command app/Controller app/Model app/Plugin app/Plugin/Grouper app/Plugin/Grouper/Config app/Plugin/Grouper/Lib app/Plugin/Grouper/Model app/Plugin/Grouper/Model/Datasource app/View/CoInvites lib/Cake/Model/Datasource
  • Date: Mon, 05 Nov 2012 19:12:16 -0500

On 11/5/12 6:27 PM, Scott Koranda wrote:

Does this really need to be in a constructor, as opposed to (say)
beforeFilter?

I do not know. We would have to be sure it is called early enough so
that the current shell application 'setup' is able to detect it.

We don't override constructors anywhere else, and I'd like to
avoid it if we can.

Why?

It's not the best way to extend functionality within cake. Note, for example, that you needed to copy a set of parameters that aren't exactly a published API. There are various defined extension points (beforeFilter, etc), and we should use those wherever possible.

Also, various posts to the cake list suggest the core developers don't see this as a preferred option.

Note the excerpt I quoted was from Model/CoGroup. SetupShell already pulls the config information directly, so if this is about setup calling CoGroup->save(), then I'm definitely not convinced this needs to be done in the constructor.

Incidentally, "if (!" is not compliant with the coding guide.

Which part of the guide specifically?

https://spaces.internet2.edu/display/COmanage/COmanage+Coding+Style#COmanageCodingStyle-Whitespace

-Benn-




Archive powered by MHonArc 2.6.16.

Top of Page