-
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.
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* Pimcore | ||
* | ||
* This source file is available under two different licenses: | ||
* - GNU General Public License version 3 (GPLv3) | ||
* - Pimcore Commercial License (PCL) | ||
* Full copyright and license information is available in | ||
* LICENSE.md which is distributed with this source code. | ||
* | ||
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org) | ||
* @license http://www.pimcore.org/license GPLv3 and PCL | ||
*/ | ||
|
||
namespace Pimcore\Bundle\StaticResolverBundle\Models\Tool; | ||
|
||
use Exception; | ||
use Pimcore\Model\Tool\SettingsStore; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class SettingsStoreResolver implements SettingsStoreResolverInterface | ||
{ | ||
|
||
/** | ||
* @throws Exception | ||
*/ | ||
public function set(string $id, float|bool|int|string $data, string $type = 'string', ?string $scope = null): bool | ||
{ | ||
return SettingsStore::set($id, $data, $type, $scope); | ||
} | ||
|
||
public function delete(string $id, ?string $scope = null): int|string | ||
{ | ||
return SettingsStore::delete($id, $scope); | ||
} | ||
|
||
public function get(string $id, ?string $scope = null): ?SettingsStore | ||
{ | ||
return SettingsStore::get($id, $scope); | ||
} | ||
|
||
public function getIdsByScope(string $scope): array | ||
{ | ||
return SettingsStore::getIdsByScope($scope); | ||
} | ||
} |
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,30 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* Pimcore | ||
* | ||
* This source file is available under two different licenses: | ||
* - GNU General Public License version 3 (GPLv3) | ||
* - Pimcore Commercial License (PCL) | ||
* Full copyright and license information is available in | ||
* LICENSE.md which is distributed with this source code. | ||
* | ||
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org) | ||
* @license http://www.pimcore.org/license GPLv3 and PCL | ||
*/ | ||
|
||
namespace Pimcore\Bundle\StaticResolverBundle\Models\Tool; | ||
|
||
use Pimcore\Model\Tool\SettingsStore; | ||
|
||
interface SettingsStoreResolverInterface | ||
{ | ||
public function set(string $id, float|bool|int|string $data, string $type = 'string', ?string $scope = null): bool; | ||
|
||
public function delete(string $id, ?string $scope = null): int|string; | ||
|
||
public function get(string $id, ?string $scope = null): ?SettingsStore; | ||
|
||
public function getIdsByScope(string $scope): array; | ||
} |