-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Happyr/blackhole
Added blackhole and filesystem service
- Loading branch information
Showing
4 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Happyr\TranslationBundle\Service; | ||
|
||
use Happyr\TranslationBundle\Model\Message; | ||
|
||
class Blackhole implements TranslationServiceInterface | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function fetchTranslation(Message $message, $updateFs = false) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function updateTranslation(Message $message) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function flagTranslation(Message $message, $type = 0) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function createAsset(Message $message) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function downloadAllTranslations() | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function synchronizeAllTranslations() | ||
{ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
namespace Happyr\TranslationBundle\Service; | ||
|
||
use Happyr\TranslationBundle\Model\Message; | ||
use Happyr\TranslationBundle\Translation\FilesystemUpdater; | ||
|
||
class Filesystem implements TranslationServiceInterface | ||
{ | ||
/** | ||
* @var FilesystemUpdater filesystemService | ||
*/ | ||
private $filesystemService; | ||
|
||
/** | ||
* | ||
* @param FilesystemUpdater $filesystemService | ||
*/ | ||
public function __construct(FilesystemUpdater $filesystemService) | ||
{ | ||
$this->filesystemService = $filesystemService; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function fetchTranslation(Message $message, $updateFs = false) | ||
{ | ||
if ($updateFs) { | ||
$this->filesystemService->updateMessageCatalog([$message]); | ||
} | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function updateTranslation(Message $message) | ||
{ | ||
$this->filesystemService->updateMessageCatalog([$message]); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function flagTranslation(Message $message, $type = 0) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function createAsset(Message $message) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function downloadAllTranslations() | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function synchronizeAllTranslations() | ||
{ | ||
} | ||
|
||
} |