<?php
namespace ModulesAbstract\PluginReports\Report\Model\Builder\Helpers;

trait BuilderPciDssTrait
{
	/**
	 * PCI-DSS compliant builder - mask the credit card numbers
	 * @var boolean
	 */
	protected $maskedCcNumbers = false;

	/**
	 * CC extractor class
	 * @var \ModulesAbstract\PluginReports\ExtraSupport\ExtractCreditCardDetails\DefaultExtractor
	 */
	protected $ccExtractor = null;


	/**
	 * Initialize the CC extractor - each builder should call this function
	 * @return \ModulesAbstract\PluginReports\Report\Model\Builder\Helpers\BuilderPciDssTrait
	 */
	protected function initializePciDssTrait()
	{
		$this->ccExtractor = new \ModulesAbstract\PluginReports\ExtraSupport\ExtractCreditCardDetails\DefaultExtractor();
		return $this;
	}

	/**
	 * Set the PCI-DSS flag
	 * @param boolean $maskedCcNumbers
	 * @return \ModulesAbstract\PluginReports\Report\Model\Builder\Helpers\BuilderPciDssTrait
	 */
	public function maskCcNumbers($maskedCcNumbers)
	{
		$this->maskedCcNumbers = $maskedCcNumbers;
		return $this;
	}


}
