diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-19 13:20:54 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-19 13:21:11 +0200 |
commit | 517e4ca5435106ab5304849248cbea4e9dffd4b0 (patch) | |
tree | 0f00076f012791b39c710994f695abf723546062 /businesslayer/folderbusinesslayer.php | |
parent | bd35b98d2c130f058b182f726636ee971625823b (diff) |
split up api class for easier testing and clearer code
Diffstat (limited to 'businesslayer/folderbusinesslayer.php')
-rw-r--r-- | businesslayer/folderbusinesslayer.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/businesslayer/folderbusinesslayer.php b/businesslayer/folderbusinesslayer.php index 80634abc8..5c5914c7a 100644 --- a/businesslayer/folderbusinesslayer.php +++ b/businesslayer/folderbusinesslayer.php @@ -25,7 +25,6 @@ namespace OCA\News\BusinessLayer; -use \OCA\News\Core\API; use \OCA\News\Db\Folder; use \OCA\News\Db\FolderMapper; use \OCA\News\Utility\Config; @@ -33,16 +32,16 @@ use \OCA\News\Utility\Config; class FolderBusinessLayer extends BusinessLayer { - private $api; + private $l10n; private $timeFactory; private $autoPurgeMinimumInterval; public function __construct(FolderMapper $folderMapper, - API $api, + $l10n, $timeFactory, Config $config){ parent::__construct($folderMapper); - $this->api = $api; + $this->l10n = $l10n; $this->timeFactory = $timeFactory; $this->autoPurgeMinimumInterval = $config->getAutoPurgeMinimumInterval(); } @@ -62,7 +61,7 @@ class FolderBusinessLayer extends BusinessLayer { if(count($existingFolders) > 0){ throw new BusinessLayerConflictException( - $this->api->getTrans()->t('Can not add folder: Exists already')); + $this->l10n->t('Can not add folder: Exists already')); } if(mb_strlen($folderName) === 0) { |