vendor/pimcore/customer-management-framework-bundle/src/SegmentAssignment/StoredFunctions/DefaultStoredFunctions.php line 28

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace CustomerManagementFrameworkBundle\SegmentAssignment\StoredFunctions;
  15. use Pimcore\Db;
  16. /**
  17.  * @inheritdoc
  18.  */
  19. class DefaultStoredFunctions implements StoredFunctionsInterface
  20. {
  21.     /**
  22.      * @inheritdoc
  23.      */
  24.     public function retrieve(string $elementIdstring $elementType): array
  25.     {
  26.         $storedFunction = static::STORED_FUNCTIONS_MAPPING[$elementType];
  27.         return explode(','Db::get()->fetchColumn("SELECT $storedFunction(:elementId)", ['elementId' => $elementId 0]));
  28.     }
  29. }