vendor/coreshop/core-shop/src/CoreShop/Component/Resource/Factory/PimcoreFactory.php line 31

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * CoreShop
  5.  *
  6.  * This source file is available under two different licenses:
  7.  *  - GNU General Public License version 3 (GPLv3)
  8.  *  - CoreShop Commercial License (CCL)
  9.  * Full copyright and license information is available in
  10.  * LICENSE.md which is distributed with this source code.
  11.  *
  12.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  13.  * @license    https://www.coreshop.org/license     GPLv3 and CCL
  14.  *
  15.  */
  16. namespace CoreShop\Component\Resource\Factory;
  17. final class PimcoreFactory implements FactoryInterfacePimcoreFactoryInterface
  18. {
  19.     /**
  20.      * @psalm-param class-string $className
  21.      */
  22.     public function __construct(
  23.         private string $className,
  24.     ) {
  25.     }
  26.     public function createNew()
  27.     {
  28.         return new $this->className();
  29.     }
  30. }