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: Scott Koranda <>
  • To: Benn Oshrin <>
  • 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, 5 Nov 2012 17:27:32 -0600

Hi,

On Mon, Nov 5, 2012 at 5:15 PM, Benn Oshrin
<>
wrote:
> On 10/25/12 6:56 PM,
>
> wrote:
>>
>> + /**
>> + * Constructor
>> + * - precondition:
>> + * - postcondition:
>> + *
>> + * @since COmanage Directory 0.7
>> + * @return instance
>> + */
>> + public function __construct($id = false, $table = null, $ds = null){
>> +
>> + // Depending on the configuration use the Grouper
>> + // plugin data source or the default data source.
>> + if (Configure::read('Grouper.COmanage.useGrouperDataSource')) {
>> + $this->useDbConfig = 'grouperCoGroup';
>> + }
>> +
>> + // Depending on the configuration signal that we
>> + // do not use a SQL relational database backend for the
>> + // data source.
>> + if (!Configure::read('COmanage.groupSqlDataSource')) {
>> + $this->usesSqlDataSource = false;
>> + }
>> +
>> + parent::__construct($id, $table, $ds);
>> + }
>
>
> 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 properly calls its parent.

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

Which part of the guide specifically?

Thanks,

Scott



Archive powered by MHonArc 2.6.16.

Top of Page