b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / a / home / dev2.destoffenstraat.com / app / Firebear / ImportExport / Model / Migration / PreJob /
Filename/home/a/home/dev2.destoffenstraat.com/app/Firebear/ImportExport/Model/Migration/PreJob/Delete.php
Size1.45 kb
Permissionrwxr-xr-x
Ownerroot : root
Create time21-Aug-2025 12:26
Last modified07-Nov-2022 06:44
Last accessed23-Aug-2025 18:14
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
/**
* @copyright: Copyright © 2019 Firebear Studio. All rights reserved.
* @author : Firebear Studio <fbeardev@gmail.com>
*/

namespace Firebear\ImportExport\Model\Migration\PreJob;

use Firebear\ImportExport\Model\Migration\Config;
use Firebear\ImportExport\Model\Migration\DbConnection;
use Firebear\ImportExport\Model\Migration\PreJobInterface;

/**
* @inheritdoc
*/
class Delete implements PreJobInterface
{
/**
* @var DbConnection
*/
protected $dbConnection;

/**
* @var string
*/
protected $table;

/**
* @var string
*/
protected $cond;

/**
* @var Config
*/
protected $config;

/**
* @param DbConnection $dbConnection
* @param Config $config
* @param string $table
* @param string $cond
*/
public function __construct(
DbConnection $dbConnection,
Config $config,
string $table,
string $cond
) {
$this->dbConnection = $dbConnection;
$this->config = $config;
$this->table = $table;
$this->cond = $cond;
}

/**
* @inheritdoc
*/
public function job()
{
$this->dbConnection->getDestinationChannel()->query('SET FOREIGN_KEY_CHECKS = 0;');
$this->dbConnection->getDestinationChannel()->delete($this->config->getM2Prefix() . $this->table, $this->cond);
$this->dbConnection->getDestinationChannel()->query('SET FOREIGN_KEY_CHECKS = 1;');
}
}