Project

General

Profile

Actions

Feature #91600

closed

Unify the handling of Singletons by applying the *Aware design pattern

Added by Tizian Schmidlin almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2020-06-06
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I've stumbled across some low hanging fruits and chances while working on indexed_search and one of them was to have an easy way to add the support for the TimeTracker at some places, rather than having to rely on a parent object to use it. A simple way to do so would be to set up a TimeTrackerAwareTrait which would allow developers to quickly add support for such a functionality, in the same vain as TYPO3 already does it for the Logger.

I think that there are some other places where this could make sense, namely for all singleton classes that are used in a general context, some examples would be:
  • TimeTracker
  • FlashMessageService
  • ConfigurationManager (<= not sure about this one)
  • CacheService
  • ...

The list goes on and could probably be extended by some more but you get the gist.

As I need it now, I'll provide the TimeTrackerAwareTrait myself.

Actions

Also available in: Atom PDF