Ticket #1596 (assigned defect)

Opened 6 years ago

Last modified 9 months ago

Fix UserAjaxProvider and singletons

Reported by: rzur2004 Assigned to: demian (accepted)
Priority: high Milestone: 1.1
Component: SGL - Tasks Severity: open
Keywords: Cc:

Description

The class mentioned above shouldn't be a singleton (defacto it isn't singleton, although it has the static method singleton()). SGL_Task_ExecuteAjaxAction invokes directly class creation process via new operator:

$oProvider = new $providerClass();

there are two proposals: 1. standardize Ajax provider as singleton with required method name example: instance(), and do hide constructor as private member.

$oProvider = & $providerClass::singleton();

2. simply remove singleton() - static member function

Change History

03/23/08 09:10:33 changed by demian

  • owner changed from rzur2004 to demian.
  • priority changed from low to normal.
  • status changed from new to assigned.
  • milestone set to 0.9.0 - polishing.

hi rzur2004

i fully agree with you, iirc this happened as a hack in our current project, i will fix this.

02/26/13 12:27:26 changed by demian

  • priority changed from normal to high.

02/26/13 13:28:36 changed by demian

  • summary changed from UserAjaxProvider and singletoness. to Fix UserAjaxProvider and singletons.