Hi, I opened an issue[1] that ezcSearch misses lazy initialization and as a first attempt to solve it, I copied ezcPersistentSessionInstance and addapted it as ezcSearchInstance. But ezcPersistentSessionInstance has itself been copied from ezcDatabaseInstance. And I need another xyzInstance for a private component of mine. And surely there'll be more things to store and retrieve instances for.
My first thought was to write an abstract ezcBaseInstance that would be extended by ezc[PersistentSession|Database|Search|Whatever]Instance, but unfortunately this doesn't really help since we miss late static binding. So my proposoal would be to provide a registry class in ezcBase that's much the same as the current classes, but takes an additional $type parameter for every method. Please see the attached code for an example. The current Instance classes would be left as is, but deprecated in favor of the registry. Best regards, Thomas [1] http://issues.ez.no/IssueView.php?Id=14633
<<attachment: instance_registry.php>>
-- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components