Working : Refactor adapter into facade

This commit is contained in:
gmorel
2013-10-10 22:29:53 +02:00
parent 7f59c8a954
commit 5a6f6483b1
23 changed files with 123 additions and 144 deletions

View File

@@ -24,7 +24,7 @@
namespace Thelia\Condition;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Thelia\Coupon\AdapterInterface;
use Thelia\Coupon\FacadeInterface;
use Thelia\Coupon\ConditionCollection;
@@ -44,7 +44,7 @@ class ConditionFactory
/** @var ContainerInterface Service Container */
protected $container = null;
/** @var AdapterInterface Provide necessary value from Thelia */
/** @var FacadeInterface Provide necessary value from Thelia */
protected $adapter;
/** @var array ConditionCollection to process*/

View File

@@ -25,7 +25,7 @@ namespace Thelia\Condition;
use Symfony\Component\Intl\Exception\NotImplementedException;
use Thelia\Core\Translation\Translator;
use Thelia\Coupon\AdapterInterface;
use Thelia\Coupon\FacadeInterface;
use Thelia\Exception\InvalidConditionValueException;
use Thelia\Model\Currency;
use Thelia\Type\FloatType;
@@ -60,7 +60,7 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
// /** @var array Parameters to be validated */
// protected $paramsToValidate = array();
/** @var AdapterInterface Provide necessary value from Thelia */
/** @var FacadeInterface Provide necessary value from Thelia */
protected $adapter = null;
/** @var Translator Service Translator */
@@ -78,9 +78,9 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface
/**
* Constructor
*
* @param AdapterInterface $adapter Service adapter
* @param FacadeInterface $adapter Service adapter
*/
public function __construct(AdapterInterface $adapter)
public function __construct(FacadeInterface $adapter)
{
$this->adapter = $adapter;
$this->translator = $adapter->getTranslator();

View File

@@ -24,7 +24,7 @@
namespace Thelia\Condition;
use Thelia\Core\Translation\Translator;
use Thelia\Coupon\AdapterInterface;
use Thelia\Coupon\FacadeInterface;
/**
* Created by JetBrains PhpStorm.
@@ -42,9 +42,9 @@ interface ConditionManagerInterface
/**
* Constructor
*
* @param AdapterInterface $adapter Service adapter
* @param FacadeInterface $adapter Service adapter
*/
function __construct(AdapterInterface $adapter);
function __construct(FacadeInterface $adapter);
/**
* Get Rule Service id