Skip to content

Commit ad73823

Browse files
Gummibeergitbook-bot
authored andcommitted
GitBook: [master] 2 pages modified
1 parent 90acbf0 commit ad73823

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## Usage
99

1010
* [Installation](usage/installation.md)
11+
* [Interface](usage/interface.md)
1112
* [Methods](usage/methods.md)
1213
* [Scopes](usage/scopes.md)
1314
* [Fallback locale](usage/fallback-locale.md)

docs/usage/interface.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Interface
2+
3+
The package provides and interface `\Astrotomic\Translatable\Contracts\Translatable` which describes the public API. It could be that the trait defines more public methods but they aren't part of the defined public API and won't force a new major release if changed or removed.
4+
5+
In addition to the interface we rely on the following methods which will, if changed or removed, also trigger a new major release.
6+
7+
## protected Interface
8+
9+
```php
10+
interface TranslatableProtected
11+
{
12+
// detect if a given translation attribute value is empty or not
13+
protected function isEmptyTranslatableAttribute(string $key, $value): bool;
14+
15+
// save all attached translations
16+
protected function saveTranslations(): bool;
17+
}
18+
```
19+
20+
21+

0 commit comments

Comments
 (0)