Files
sterivein/local/modules/PurgeFakeCustomer/Event/FakeCustomerEvent.php

84 lines
1.4 KiB
PHP

<?php
namespace PurgeFakeCustomer\Event;
use Thelia\Core\Event\ActionEvent;
class FakeCustomerEvent extends ActionEvent
{
const PURGE = 'purgefakecustomer.purge';
/* Critère de purge des faux clients */
protected $critere;
/** @var string[] */
protected $status = [];
/** @var bool */
protected $verbose;
/** @var int */
protected $deletedCount = 0;
/**
* FakeCustomerEvent constructor.
*/
public function __construct($critere, $verbose = false)
{
$this->critere = $critere;
$this->verbose = $verbose;
}
/**
* @return string
*/
public function getCritere()
{
return $this->critere;
}
/**
* @return string[]
*/
public function getStatus()
{
return $this->status;
}
/**
* @param string $status
* @return $this
*/
public function appendStatus($status, $level = 'info')
{
$this->status[$status] = $level;
return $this;
}
/**
* @return boolean
*/
public function isVerbose()
{
return $this->verbose;
}
/**
* @return int
*/
public function getDeletedCount()
{
return $this->deletedCount;
}
/**
* @param int $deletedCount
* @return $this
*/
public function setDeletedCount($deletedCount)
{
$this->deletedCount = $deletedCount;
return $this;
}
}