Skip to content

Commit

Permalink
[Task] Add PathFormatterResolver (#86)
Browse files Browse the repository at this point in the history
* Add PathFormatterResolver

* Apply php-cs-fixer changes

---------

Co-authored-by: martineiber <11687066+martineiber@users.noreply.github.com>
  • Loading branch information
martineiber and martineiber authored Jan 21, 2025
1 parent 78e2f80 commit 9489d2d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
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);
}
}
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;
}

0 comments on commit 9489d2d

Please sign in to comment.