-
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.
[Task] Add PathFormatterResolver (#86)
* Add PathFormatterResolver * Apply php-cs-fixer changes --------- Co-authored-by: martineiber <11687066+martineiber@users.noreply.github.com>
- Loading branch information
1 parent
78e2f80
commit 9489d2d
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/Models/DataObject/ClassDefinition/Helper/PathFormatterResolver.php
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,31 @@ | ||
<?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\DataObject\ClassDefinition\Helper; | ||
|
||
use Pimcore\Model\DataObject\ClassDefinition\Helper\PathFormatterResolver as PimcorePathFormatterResolver; | ||
use Pimcore\Model\DataObject\ClassDefinition\PathFormatterInterface; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class PathFormatterResolver implements PathFormatterResolverInterface | ||
{ | ||
public function resolvePathFormatter(string $formatterClass): ?PathFormatterInterface | ||
{ | ||
return PimcorePathFormatterResolver::resolvePathFormatter($formatterClass); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Models/DataObject/ClassDefinition/Helper/PathFormatterResolverInterface.php
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,27 @@ | ||
<?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\DataObject\ClassDefinition\Helper; | ||
|
||
use Pimcore\Model\DataObject\ClassDefinition\PathFormatterInterface; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
interface PathFormatterResolverInterface | ||
{ | ||
public function resolvePathFormatter(string $formatterClass): ?PathFormatterInterface; | ||
} |