-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Naming convention for interfaces (#155)
Interfaces now have an `Interface` suffix as per https://www.php-fig.org/bylaws/psr-naming-conventions/
- Loading branch information
Showing
49 changed files
with
200 additions
and
128 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
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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace SpomkyLabs\PwaBundle\CachingStrategy; | ||
|
||
interface CacheStrategyInterface | ||
{ | ||
public const STRATEGY_CACHE_FIRST = 'CacheFirst'; | ||
|
||
public const STRATEGY_CACHE_ONLY = 'CacheOnly'; | ||
|
||
public const STRATEGY_NETWORK_FIRST = 'NetworkFirst'; | ||
|
||
public const STRATEGY_NETWORK_ONLY = 'NetworkOnly'; | ||
|
||
public const STRATEGY_STALE_WHILE_REVALIDATE = 'StaleWhileRevalidate'; | ||
|
||
public const STRATEGIES = [ | ||
self::STRATEGY_CACHE_FIRST, | ||
self::STRATEGY_CACHE_ONLY, | ||
self::STRATEGY_NETWORK_FIRST, | ||
self::STRATEGY_NETWORK_ONLY, | ||
self::STRATEGY_STALE_WHILE_REVALIDATE, | ||
]; | ||
|
||
public function getName(): ?string; | ||
|
||
public function isEnabled(): bool; | ||
|
||
public function needsWorkbox(): bool; | ||
|
||
public function render(string $cacheObjectName, bool $debug = false): string; | ||
} |
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
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,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace SpomkyLabs\PwaBundle\CachingStrategy; | ||
|
||
interface HasCacheStrategiesInterface | ||
{ | ||
/** | ||
* @return array<CacheStrategyInterface> | ||
*/ | ||
public function getCacheStrategies(): array; | ||
} |
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
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
Oops, something went wrong.