You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Style settings are cached in static property Style::$styles, in 'Resident Process Mode' such as Swoole, that may cause to some unexpected problems. For example, set different style values with same name in two concurrent coroutines, the latter would overwrite or use the former's value.
In my programs, I can set each different value to a unique name. But now that every style name is unique, why not set them after the Resident Process be started and use them in each coroutine latter? Set and reset same values is a waste of computer resources.
So I need some way to prevent reseting styles in PhpWord's __construct method, for example, provide a boolean static property Style::$notReset to control whether to clear Style::$styles.
Describe the expected behavior
Provide some way to prevent reseting styles when initiate a PhpWord instance. Another thorough suggestion is cache style settings in Style's instance property rather than it's static property.
Priority
I want to crowdfund the feature (with @algora-io) and fund a community developer.
I want to pay the feature and fund a maintainer for that. (Contact @Progi1984)
The text was updated successfully, but these errors were encountered:
Describe the problem
Style settings are cached in static property Style::$styles, in 'Resident Process Mode' such as Swoole, that may cause to some unexpected problems. For example, set different style values with same name in two concurrent coroutines, the latter would overwrite or use the former's value.
In my programs, I can set each different value to a unique name. But now that every style name is unique, why not set them after the Resident Process be started and use them in each coroutine latter? Set and reset same values is a waste of computer resources.
So I need some way to prevent reseting styles in PhpWord's __construct method, for example, provide a boolean static property Style::$notReset to control whether to clear Style::$styles.
Describe the expected behavior
Provide some way to prevent reseting styles when initiate a PhpWord instance. Another thorough suggestion is cache style settings in Style's instance property rather than it's static property.
Priority
The text was updated successfully, but these errors were encountered: