diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index a23314b8..d1f897f1 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -8,6 +8,7 @@ ## Usage * [Installation](usage/installation.md) +* [Interface](usage/interface.md) * [Methods](usage/methods.md) * [Scopes](usage/scopes.md) * [Fallback locale](usage/fallback-locale.md) diff --git a/docs/usage/interface.md b/docs/usage/interface.md new file mode 100644 index 00000000..bbaf2e9d --- /dev/null +++ b/docs/usage/interface.md @@ -0,0 +1,21 @@ +# Interface + +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. + +In addition to the interface we rely on the following methods which will, if changed or removed, also trigger a new major release. + +## protected Interface + +```php +interface TranslatableProtected +{ + // detect if a given translation attribute value is empty or not + protected function isEmptyTranslatableAttribute(string $key, $value): bool; + + // save all attached translations + protected function saveTranslations(): bool; +} +``` + + +