403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/GXMainComponents/Services/System/AddonValue/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/GXMainComponents/Services/System/AddonValue//AddonValueService.inc.php
<?php

/* --------------------------------------------------------------
   AddonValueService.inc.php 2015-11-20 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2015 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

MainFactory::load_class('AddonValueServiceInterface');

/**
 * Class AddonValueService
 *
 * This service will handle the addon values for different contexts of the shop. The addon values is
 * a mechanism for external developers to introduce values to key-entities of the project (e.g. order,
 * product etc.) without further changing the database structure. Take a look at the "Storages" directory
 * for the available storage classes. More classes will be created gradually.
 *
 * @category System
 * @package  AddonValue
 */
class AddonValueService implements AddonValueServiceInterface
{
    /**
     * @var AddonValueStorageFactory
     */
    protected $addonValueStorageFactory;
    
    
    /**
     * AddonValueService Constructor
     *
     * @param AddonValueStorageFactoryInterface $addonValueStorageFactory
     */
    public function __construct(AddonValueStorageFactoryInterface $addonValueStorageFactory)
    {
        $this->addonValueStorageFactory = $addonValueStorageFactory;
    }
    
    
    /**
     * Save the addon values of a storage container in the database.
     *
     * @param AddonValueContainerInterface $container
     *
     * @return AddonValueService Returns the class instance.
     */
    public function storeAddonValues(AddonValueContainerInterface $container)
    {
        $addonValueStorage = $this->addonValueStorageFactory->createAddonValueStorageByContainerObject($container);
        $addonValueStorage->setValues(new IdType($container->getAddonValueContainerId()), $container->getAddonValues());
        
        return $this;
    }
    
    
    /**
     * Load the addon values of a storage container from the database.
     *
     * @param AddonValueContainerInterface $container
     *
     * @return AddonValueService Returns the class instance.
     */
    public function loadAddonValues(AddonValueContainerInterface $container)
    {
        $addonValueStorage = $this->addonValueStorageFactory->createAddonValueStorageByContainerObject($container);
        $containerValues   = $addonValueStorage->getValuesByContainerId(new IdType($container->getAddonValueContainerId()));
        $container->addAddonValues($containerValues);
        
        return $this;
    }
    
    
    /**
     * Remove the addon values of a storage container.
     *
     * @param AddonValueContainerInterface $container
     *
     * @return AddonValueService Returns the class instance.
     */
    public function deleteAddonValues(AddonValueContainerInterface $container)
    {
        $addonValueStorage = $this->addonValueStorageFactory->createAddonValueStorageByContainerObject($container);
        $addonValueStorage->deleteValuesByContainerId(new IdType($container->getAddonValueContainerId()));
        
        return $this;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit