Skip to content

Commit 0a12d5d

Browse files
committed
add service getter
1 parent 7812d27 commit 0a12d5d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/Facades/Translator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
use Illuminate\Support\Facades\Facade;
1313

1414
/**
15+
* @method static ?TranslateServiceInterface getTranslateService()
16+
* @method static ?ProofreadServiceInterface getProofreadService()
17+
* @method static ?SearchCodeServiceInterface getSearchcodeService()
1518
* @method static string getJsonNamespace()
1619
* @method static array<int, string> getLocales()
1720
* @method static array<int, string> getNamespaces(string $locale)

src/Translator.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ public function __construct(
2727
//
2828
}
2929

30+
public function getTranslateService(): ?TranslateServiceInterface
31+
{
32+
return $this->translateService;
33+
}
34+
35+
public function getProofreadService(): ?ProofreadServiceInterface
36+
{
37+
return $this->proofreadService;
38+
}
39+
40+
public function getSearchcodeService(): ?SearchCodeServiceInterface
41+
{
42+
return $this->searchcodeService;
43+
}
44+
3045
public function getJsonNamespace(): string
3146
{
3247
return static::JSON_NAMESPACE;

0 commit comments

Comments
 (0)