. */ /* */ /**********************************************************************************/ namespace Thelia\Condition; use Thelia\Core\Translation\Translator; use Thelia\Coupon\AdapterInterface; /** * Created by JetBrains PhpStorm. * Date: 8/19/13 * Time: 3:24 PM * * Manage how the application checks its state in order to check if it matches the implemented condition * * @package Condition * @author Guillaume MOREL * */ interface ConditionManagerInterface { /** * Constructor * * @param AdapterInterface $adapter Service adapter */ function __construct(AdapterInterface $adapter); /** * Get Rule Service id * * @return string */ public function getServiceId(); // /** // * Check if backoffice inputs are relevant or not // * // * @return bool // */ // public function checkBackOfficeInput(); // /** // * Check if Checkout inputs are relevant or not // * // * @return bool // */ // public function checkCheckoutInput(); /** * Check validators relevancy and store them * * @param array $operators Operators the Admin set in BackOffice * @param array $values Values the Admin set in BackOffice * * @throws \InvalidArgumentException * @return $this */ public function setValidatorsFromForm(array $operators, array $values); // /** // * Check if the current Checkout matches this condition // * // * @return bool // */ // public function isMatching(); /** * Test if the current application state matches conditions * * @return bool */ public function isMatching(); /** * Return all available Operators for this condition * * @return array Operators::CONST */ public function getAvailableOperators(); /** * Get I18n name * * @return string */ public function getName(); /** * Get I18n tooltip * * @return string */ public function getToolTip(); /** * Return all validators * * @return array */ public function getValidators(); // /** // * Populate a Condition from a form admin // * // * @param array $operators Condition Operator set by the Admin // * @param array $values Condition Values set by the Admin // * // * @return bool // */ // public function populateFromForm(array$operators, array $values); /** * Return a serializable Condition * * @return SerializableCondition */ public function getSerializableCondition(); }