diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-10 13:30:00 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-10 13:30:00 +0200 |
commit | 347000cc2d5597c1971942ebdbe97461c9fa5802 (patch) | |
tree | 8a2f6dc166ad871c646b4cf8bf13f4a9fcd02e55 /dependencyinjection | |
parent | c487bfe23312a5b266d8eb21a3825ab791a1c3e8 (diff) |
use a deleted flag for deleted feeds to handle undo
Diffstat (limited to 'dependencyinjection')
-rw-r--r-- | dependencyinjection/dicontainer.php | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/dependencyinjection/dicontainer.php b/dependencyinjection/dicontainer.php index 8334a40ad..464dc1d6a 100644 --- a/dependencyinjection/dicontainer.php +++ b/dependencyinjection/dicontainer.php @@ -70,7 +70,11 @@ class DIContainer extends BaseContainer { /** * Configuration values */ - $this['autoPurgeCount'] = 200; // per feed + $this['autoPurgeMinimumInterval'] = 60; // seconds, used to define how + // long deleted folders and feeds + // should still be kept for an + // undo actions + $this['autoPurgeCount'] = 200; // number of allowed unread articles per feed $this['simplePieCacheDuration'] = 30*60; // seconds $this['simplePieCacheDirectory'] = $this->share(function($c) { @@ -145,18 +149,30 @@ class DIContainer extends BaseContainer { * Business Layer */ $this['FolderBusinessLayer'] = $this->share(function($c){ - return new FolderBusinessLayer($c['FolderMapper'], $c['API']); + return new FolderBusinessLayer( + $c['FolderMapper'], + $c['API'], + $c['TimeFactory'], + $c['autoPurgeMinimumInterval']); }); $this['FeedBusinessLayer'] = $this->share(function($c){ - return new FeedBusinessLayer($c['FeedMapper'], $c['Fetcher'], - $c['ItemMapper'], $c['API'], $c['TimeFactory'], - $c['ImportParser']); + return new FeedBusinessLayer( + $c['FeedMapper'], + $c['Fetcher'], + $c['ItemMapper'], + $c['API'], + $c['TimeFactory'], + $c['ImportParser'], + $c['autoPurgeMinimumInterval']); }); $this['ItemBusinessLayer'] = $this->share(function($c){ - return new ItemBusinessLayer($c['ItemMapper'], $c['StatusFlag'], - $c['TimeFactory'], $c['autoPurgeCount']); + return new ItemBusinessLayer( + $c['ItemMapper'], + $c['StatusFlag'], + $c['TimeFactory'], + $c['autoPurgeCount']); }); |