diff --git a/.gitignore b/.gitignore index 2219e9c48..3523554ea 100755 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ phpunit.phar phpmyadmin templates/default-esi local/modules/TemplateEsiModule +composer.phar diff --git a/composer.phar b/composer.phar deleted file mode 100755 index c076f78da..000000000 Binary files a/composer.phar and /dev/null differ diff --git a/core/bootstrap.php b/core/bootstrap.php index a75190704..468df2eac 100755 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -17,8 +17,10 @@ $loader = require __DIR__ . "/vendor/autoload.php"; -if (!file_exists(THELIA_ROOT . '/local/config/database.yml')) { - define('THELIA_INSTALL_MODE',true); +if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) { + $request = \Thelia\Core\HttpFoundation\Request::createFromGlobals(); + header('location: '.$request->getSchemeAndHttpHost() . '/install'); + exit; } /*else { define('THELIA_INSTALL_MODE',true); diff --git a/core/lib/Thelia/Action/Administrator.php b/core/lib/Thelia/Action/Administrator.php new file mode 100644 index 000000000..0f3891e15 --- /dev/null +++ b/core/lib/Thelia/Action/Administrator.php @@ -0,0 +1,108 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Action; + +use Propel\Runtime\ActiveQuery\Criteria; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Thelia\Core\Event\Administrator\AdministratorEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Core\Security\AccessManager; +use Thelia\Model\Admin as AdminModel; +use Thelia\Model\AdminQuery; + +class Administrator extends BaseAction implements EventSubscriberInterface +{ + /** + * @param AdministratorEvent $event + */ + public function create(AdministratorEvent $event) + { + $administrator = new AdminModel(); + + $administrator + ->setDispatcher($this->getDispatcher()) + ->setFirstname($event->getFirstname()) + ->setLastname($event->getLastname()) + ->setLogin($event->getLogin()) + ->setPassword($event->getPassword()) + ->setProfileId($event->getProfile()) + ; + + $administrator->save(); + + $event->setAdministrator($administrator); + } + + /** + * @param AdministratorEvent $event + */ + public function update(AdministratorEvent $event) + { + if (null !== $administrator = AdminQuery::create()->findPk($event->getId())) { + + $administrator + ->setDispatcher($this->getDispatcher()) + ->setFirstname($event->getFirstname()) + ->setLastname($event->getLastname()) + ->setLogin($event->getLogin()) + ->setProfileId($event->getProfile()) + ; + + if('' !== $event->getPassword()) { + $administrator->setPassword($event->getPassword()); + } + + $administrator->save(); + + $event->setAdministrator($administrator); + } + } + + /** + * @param AdministratorEvent $event + */ + public function delete(AdministratorEvent $event) + { + if (null !== $administrator = AdminQuery::create()->findPk($event->getId())) { + + $administrator + ->delete() + ; + + $event->setAdministrator($administrator); + } + } + + /** + * {@inheritDoc} + */ + public static function getSubscribedEvents() + { + return array( + TheliaEvents::ADMINISTRATOR_CREATE => array("create", 128), + TheliaEvents::ADMINISTRATOR_UPDATE => array("update", 128), + TheliaEvents::ADMINISTRATOR_DELETE => array("delete", 128), + ); + } +} diff --git a/core/lib/Thelia/Action/Cart.php b/core/lib/Thelia/Action/Cart.php index 89be6ea0a..402bdfaac 100755 --- a/core/lib/Thelia/Action/Cart.php +++ b/core/lib/Thelia/Action/Cart.php @@ -26,6 +26,7 @@ namespace Thelia\Action; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Thelia\Core\Event\Cart\CartEvent; +use Thelia\Core\Event\TheliaEvents; use Thelia\Model\ProductPrice; use Thelia\Model\ProductPriceQuery; use Thelia\Model\CartItem; @@ -69,7 +70,8 @@ class Cart extends BaseAction implements EventSubscriberInterface } if ($append && $cartItem !== null) { - $this->updateQuantity($cartItem, $quantity); + $cartItem->addQuantity($quantity) + ->save(); } } @@ -91,6 +93,17 @@ class Cart extends BaseAction implements EventSubscriberInterface } } + /** + * Clear the cart + * @param CartEvent $event + */ + public function clear(CartEvent $event) + { + if (null !== $cart = $event->getCart()) { + $cart->delete(); + } + } + /** * * Modify article's quantity @@ -138,9 +151,10 @@ class Cart extends BaseAction implements EventSubscriberInterface public static function getSubscribedEvents() { return array( - "action.addArticle" => array("addItem", 128), - "action.deleteArticle" => array("deleteItem", 128), - "action.updateArticle" => array("changeItem", 128), + TheliaEvents::CART_ADDITEM => array("addItem", 128), + TheliaEvents::CART_DELETEITEM => array("deleteItem", 128), + TheliaEvents::CART_UPDATEITEM => array("changeItem", 128), + TheliaEvents::CART_CLEAR => array("clear", 128), ); } diff --git a/core/lib/Thelia/Action/Coupon.php b/core/lib/Thelia/Action/Coupon.php index b3086c266..e3a8defbf 100755 --- a/core/lib/Thelia/Action/Coupon.php +++ b/core/lib/Thelia/Action/Coupon.php @@ -35,6 +35,7 @@ use Thelia\Coupon\CouponManager; use Thelia\Coupon\ConditionCollection; use Thelia\Coupon\Type\CouponInterface; use Thelia\Model\Coupon as CouponModel; +use Thelia\Model\CouponQuery; /** * Created by JetBrains PhpStorm. @@ -68,7 +69,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface */ public function update(CouponCreateOrUpdateEvent $event) { - $coupon = $event->getCoupon(); + $coupon = $event->getCouponModel(); $this->createOrUpdate($coupon, $event); } @@ -76,13 +77,13 @@ class Coupon extends BaseAction implements EventSubscriberInterface /** * Occurring when a Coupon condition is about to be updated * - * @param CouponCreateOrUpdateEvent $event Event creation or update Coupon Rule + * @param CouponCreateOrUpdateEvent $event Event creation or update Coupon condition */ public function updateCondition(CouponCreateOrUpdateEvent $event) { - $coupon = $event->getCoupon(); + $modelCoupon = $event->getCouponModel(); - $this->createOrUpdateCondition($coupon, $event); + $this->createOrUpdateCondition($modelCoupon, $event); } /** @@ -104,6 +105,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface $coupon = $couponFactory->buildCouponFromCode($event->getCode()); $isValid = $coupon->isMatching(); + if ($isValid) { /** @var Request $request */ $request = $this->container->get('request'); @@ -119,8 +121,15 @@ class Coupon extends BaseAction implements EventSubscriberInterface $request->getSession()->setConsumedCoupons($consumedCoupons); $totalDiscount = $couponManager->getDiscount(); + // @todo insert false product in cart with the name of the coupon and the discount as negative price + + // Decrement coupon quantity + $couponQuery = CouponQuery::create(); + $couponModel = $couponQuery->findOneByCode($coupon->getCode()); + $couponManager->decrementeQuantity($couponModel); + + $request->getSession()->getCart()->setDiscount($totalDiscount); - // @todo modify Cart total discount } $event->setIsValid($isValid); @@ -153,7 +162,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface $event->getCode(), $event->getTitle(), $event->getAmount(), - $event->getType(), + $event->getServiceId(), $event->isRemovingPostage(), $event->getShortDescription(), $event->getDescription(), @@ -166,7 +175,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface $event->getLocale() ); - $event->setCoupon($coupon); + $event->setCouponModel($coupon); } /** @@ -188,7 +197,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface $event->getLocale() ); - $event->setCoupon($coupon); + $event->setCouponModel($coupon); } /** diff --git a/core/lib/Thelia/Action/Lang.php b/core/lib/Thelia/Action/Lang.php new file mode 100644 index 000000000..1c74da3bd --- /dev/null +++ b/core/lib/Thelia/Action/Lang.php @@ -0,0 +1,146 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Action; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Thelia\Core\Event\Lang\LangCreateEvent; +use Thelia\Core\Event\Lang\LangDefaultBehaviorEvent; +use Thelia\Core\Event\Lang\LangDeleteEvent; +use Thelia\Core\Event\Lang\LangToggleDefaultEvent; +use Thelia\Core\Event\Lang\LangUpdateEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Form\Lang\LangUrlEvent; +use Thelia\Model\ConfigQuery; +use Thelia\Model\LangQuery; +use Thelia\Model\Lang as LangModel; + + +/** + * Class Lang + * @package Thelia\Action + * @author Manuel Raynaud + */ +class Lang extends BaseAction implements EventSubscriberInterface +{ + + public function update(LangUpdateEvent $event) + { + if (null !== $lang = LangQuery::create()->findPk($event->getId())) { + $lang->setDispatcher($this->getDispatcher()); + + $lang->setTitle($event->getTitle()) + ->setLocale($event->getLocale()) + ->setCode($event->getCode()) + ->setDateFormat($event->getDateFormat()) + ->setTimeFormat($event->getTimeFormat()) + ->save(); + + $event->setLang($lang); + } + } + + public function toggleDefault(LangToggleDefaultEvent $event) + { + if (null !== $lang = LangQuery::create()->findPk($event->getLangId())) { + $lang->setDispatcher($this->getDispatcher()); + + $lang->toggleDefault(); + + $event->setLang($lang); + } + } + + public function create(LangCreateEvent $event) + { + $lang = new LangModel(); + + $lang + ->setDispatcher($this->getDispatcher()) + ->setTitle($event->getTitle()) + ->setCode($event->getCode()) + ->setLocale($event->getLocale()) + ->setDateFormat($event->getDateFormat()) + ->setTimeFormat($event->getTimeFormat()) + ->save(); + + $event->setLang($lang); + } + + public function delete(LangDeleteEvent $event) + { + if (null !== $lang = LangQuery::create()->findPk($event->getLangId())) { + $lang->setDispatcher($this->getDispatcher()) + ->delete(); + + $event->setLang($lang); + } + } + + public function defaultBehavior(LangDefaultBehaviorEvent $event) + { + ConfigQuery::create() + ->filterByName('default_lang_without_translation') + ->update(array('Value' => $event->getDefaultBehavior())); + } + + public function langUrl(LangUrlEvent $event) + { + foreach($event->getUrl() as $id => $url){ + LangQuery::create() + ->filterById($id) + ->update(array('Url' => $url)); + } + } + + /** + * Returns an array of event names this subscriber wants to listen to. + * + * The array keys are event names and the value can be: + * + * * The method name to call (priority defaults to 0) + * * An array composed of the method name to call and the priority + * * An array of arrays composed of the method names to call and respective + * priorities, or 0 if unset + * + * For instance: + * + * * array('eventName' => 'methodName') + * * array('eventName' => array('methodName', $priority)) + * * array('eventName' => array(array('methodName1', $priority), array('methodName2')) + * + * @return array The event names to listen to + * + * @api + */ + public static function getSubscribedEvents() + { + return array( + TheliaEvents::LANG_UPDATE => array('update', 128), + TheliaEvents::LANG_TOGGLEDEFAULT => array('toggleDefault', 128), + TheliaEvents::LANG_CREATE => array('create', 128), + TheliaEvents::LANG_DELETE => array('delete', 128), + TheliaEvents::LANG_DEFAULTBEHAVIOR => array('defaultBehavior', 128), + TheliaEvents::LANG_URL => array('langUrl', 128) + ); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Action/Order.php b/core/lib/Thelia/Action/Order.php index eea8b82b7..532284382 100755 --- a/core/lib/Thelia/Action/Order.php +++ b/core/lib/Thelia/Action/Order.php @@ -25,6 +25,8 @@ namespace Thelia\Action; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Thelia\Cart\CartTrait; +use Thelia\Core\Event\Cart\CartEvent; use Thelia\Core\Event\Order\OrderAddressEvent; use Thelia\Core\Event\Order\OrderEvent; use Thelia\Core\Event\TheliaEvents; @@ -47,6 +49,8 @@ use Thelia\Tools\I18n; */ class Order extends BaseAction implements EventSubscriberInterface { + use CartTrait; + /** * @param \Thelia\Core\Event\Order\OrderEvent $event */ @@ -97,7 +101,9 @@ class Order extends BaseAction implements EventSubscriberInterface } /** - * @param \Thelia\Core\Event\Order\OrderEvent $event + * @param OrderEvent $event + * + * @throws \Thelia\Exception\TheliaProcessException */ public function create(OrderEvent $event) { @@ -221,6 +227,7 @@ class Order extends BaseAction implements EventSubscriberInterface ->setWeight($pse->getWeight()) ->setTaxRuleTitle($taxRuleI18n->getTitle()) ->setTaxRuleDescription($taxRuleI18n->getDescription()) + ->setEanCode($pse->getEanCode()) ; $orderProduct->setDispatcher($this->getDispatcher()); $orderProduct->save($con); @@ -266,7 +273,8 @@ class Order extends BaseAction implements EventSubscriberInterface $event->setPlacedOrder($placedOrder); $this->getSession()->setOrder($sessionOrder); - /* empty cart @todo */ + /* empty cart */ + $this->getDispatcher()->dispatch(TheliaEvents::CART_CLEAR, new CartEvent($this->getCart($this->getRequest()))); /* call pay method */ $paymentModuleReflection = new \ReflectionClass($paymentModule->getFullNamespace()); diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index bd918c5e6..e82b92bf6 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -54,10 +54,10 @@ use Thelia\Core\Event\Product\ProductDeleteCategoryEvent; use Thelia\Core\Event\Product\ProductAddCategoryEvent; use Thelia\Model\AttributeAvQuery; use Thelia\Model\AttributeCombination; -use Thelia\Core\Event\Product\ProductCreateCombinationEvent; +use Thelia\Core\Event\Product\ProductSaleElementCreateEvent; use Propel\Runtime\Propel; use Thelia\Model\Map\ProductTableMap; -use Thelia\Core\Event\Product\ProductDeleteCombinationEvent; +use Thelia\Core\Event\Product\ProductSaleElementDeleteEvent; use Thelia\Model\ProductPrice; use Thelia\Model\ProductSaleElements; use Thelia\Core\Event\Product\ProductAddAccessoryEvent; @@ -85,8 +85,6 @@ class Product extends BaseAction implements EventSubscriberInterface // Set the default tax rule to this product ->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true)) - //public function create($defaultCategoryId, $basePrice, $priceCurrencyId, $taxRuleId, $baseWeight) { - ->create( $event->getDefaultCategory(), $event->getBasePrice(), @@ -304,6 +302,11 @@ class Product extends BaseAction implements EventSubscriberInterface return $this->genericUpdatePosition(ProductAssociatedContentQuery::create(), $event); } + /** + * Update the value of a product feature. + * + * @param FeatureProductUpdateEvent $event + */ public function updateFeatureProductValue(FeatureProductUpdateEvent $event) { // If the feature is not free text, it may have one ore more values. @@ -346,6 +349,11 @@ class Product extends BaseAction implements EventSubscriberInterface $event->setFeatureProduct($featureProduct); } + /** + * Delete a product feature value + * + * @param FeatureProductDeleteEvent $event + */ public function deleteFeatureProductValue(FeatureProductDeleteEvent $event) { $featureProduct = FeatureProductQuery::create() @@ -355,76 +363,6 @@ class Product extends BaseAction implements EventSubscriberInterface ; } - public function createProductCombination(ProductCreateCombinationEvent $event) - { - $con = Propel::getWriteConnection(ProductTableMap::DATABASE_NAME); - - $con->beginTransaction(); - - try { - $product = $event->getProduct(); - - // Create an empty product sale element - $salesElement = new ProductSaleElements(); - - $salesElement - ->setProduct($product) - ->setRef($product->getRef()) - ->setPromo(0) - ->setNewness(0) - ->setWeight(0) - ->setIsDefault(false) - ->save($con) - ; - - // Create an empty product price in the default currency - $product_price = new ProductPrice(); - - $product_price - ->setProductSaleElements($salesElement) - ->setPromoPrice(0) - ->setPrice(0) - ->setCurrencyId($event->getCurrencyId()) - ->save($con) - ; - - $combinationAttributes = $event->getAttributeAvList(); - - if (count($combinationAttributes) > 0) { - - foreach ($combinationAttributes as $attributeAvId) { - - $attributeAv = AttributeAvQuery::create()->findPk($attributeAvId); - - if ($attributeAv !== null) { - $attributeCombination = new AttributeCombination(); - - $attributeCombination - ->setAttributeAvId($attributeAvId) - ->setAttribute($attributeAv->getAttribute()) - ->setProductSaleElements($salesElement) - ->save(); - } - } - } - - // Store all the stuff ! - $con->commit(); - } catch (\Exception $ex) { - - $con->rollback(); - - throw $ex; - } - } - - public function deleteProductCombination(ProductDeleteCombinationEvent $event) - { - if (null !== $pse = ProductSaleElementsQuery::create()->findPk($event->getProductSaleElementId())) { - $pse->delete(); - } - } - /** * {@inheritDoc} */ @@ -436,18 +374,15 @@ class Product extends BaseAction implements EventSubscriberInterface TheliaEvents::PRODUCT_DELETE => array("delete", 128), TheliaEvents::PRODUCT_TOGGLE_VISIBILITY => array("toggleVisibility", 128), - TheliaEvents::PRODUCT_UPDATE_POSITION => array("updatePosition", 128), + TheliaEvents::PRODUCT_UPDATE_POSITION => array("updatePosition", 128), TheliaEvents::PRODUCT_ADD_CONTENT => array("addContent", 128), TheliaEvents::PRODUCT_REMOVE_CONTENT => array("removeContent", 128), - TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION => array("updateAccessoryPosition", 128), TheliaEvents::PRODUCT_UPDATE_CONTENT_POSITION => array("updateContentPosition", 128), - TheliaEvents::PRODUCT_ADD_COMBINATION => array("createProductCombination", 128), - TheliaEvents::PRODUCT_DELETE_COMBINATION => array("deleteProductCombination", 128), - - TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128), - TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128), + TheliaEvents::PRODUCT_ADD_ACCESSORY => array("addAccessory", 128), + TheliaEvents::PRODUCT_REMOVE_ACCESSORY => array("removeAccessory", 128), + TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION => array("updateAccessoryPosition", 128), TheliaEvents::PRODUCT_ADD_CATEGORY => array("addCategory", 128), TheliaEvents::PRODUCT_REMOVE_CATEGORY => array("removeCategory", 128), @@ -456,7 +391,6 @@ class Product extends BaseAction implements EventSubscriberInterface TheliaEvents::PRODUCT_FEATURE_UPDATE_VALUE => array("updateFeatureProductValue", 128), TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE => array("deleteFeatureProductValue", 128), - ); } } diff --git a/core/lib/Thelia/Action/ProductSaleElement.php b/core/lib/Thelia/Action/ProductSaleElement.php new file mode 100644 index 000000000..730fe0764 --- /dev/null +++ b/core/lib/Thelia/Action/ProductSaleElement.php @@ -0,0 +1,232 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Action; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +use Thelia\Model\ProductQuery; +use Thelia\Model\Product as ProductModel; + +use Thelia\Core\Event\TheliaEvents; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementCreateEvent; +use Thelia\Model\Map\ProductSaleElementsTableMap; +use Thelia\Model\ProductSaleElements; +use Thelia\Model\ProductPrice; +use Thelia\Model\AttributeCombination; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementDeleteEvent; +use Thelia\Model\ProductSaleElementsQuery; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementUpdateEvent; +use Thelia\Model\ProductPriceQuery; +use Propel\Runtime\Propel; +use Thelia\Model\AttributeAvQuery; +use Thelia\Model\Currency; +use Thelia\Model\Map\AttributeCombinationTableMap; +use Propel\Runtime\ActiveQuery\Criteria; + +class ProductSaleElement extends BaseAction implements EventSubscriberInterface +{ + /** + * Create a new product sale element, with or without combination + * + * @param ProductSaleElementCreateEvent $event + * @throws Exception + */ + public function create(ProductSaleElementCreateEvent $event) + { + $con = Propel::getWriteConnection(ProductSaleElementsTableMap::DATABASE_NAME); + + $con->beginTransaction(); + + try { + // Check if we have a PSE without combination, this is the "default" PSE. Attach the combination to this PSE + $salesElement = ProductSaleElementsQuery::create() + ->filterByProductId($event->getProduct()->getId()) + ->joinAttributeCombination(null, Criteria::LEFT_JOIN) + ->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, null, Criteria::ISNULL) + ->findOne($con); + + if ($salesElement == null) { + // Create a new product sale element + $salesElement = $event->getProduct()->createDefaultProductSaleElement($con, 0, 0, $event->getCurrencyId(), true); + } + else { + // This one is the default + $salesElement->setIsDefault(true)->save($con); + } + + // Attach combination, if defined. + $combinationAttributes = $event->getAttributeAvList(); + + if (count($combinationAttributes) > 0) { + + foreach ($combinationAttributes as $attributeAvId) { + + $attributeAv = AttributeAvQuery::create()->findPk($attributeAvId); + + if ($attributeAv !== null) { + $attributeCombination = new AttributeCombination(); + + $attributeCombination + ->setAttributeAvId($attributeAvId) + ->setAttribute($attributeAv->getAttribute()) + ->setProductSaleElements($salesElement) + ->save(); + } + } + } + + // Store all the stuff ! + $con->commit(); + } + catch (\Exception $ex) { + + $con->rollback(); + + throw $ex; + } + } + + /** + * Update an existing product sale element + * + * @param ProductSaleElementUpdateEvent $event + */ + public function update(ProductSaleElementUpdateEvent $event) + { + $salesElement = ProductSaleElementsQuery::create()->findPk($event->getProductSaleElementId()); + + $con = Propel::getWriteConnection(ProductSaleElementsTableMap::DATABASE_NAME); + + $con->beginTransaction(); + + try { + + // If product sale element is not defined, create it. + if ($salesElement == null) { + $salesElement = new ProductSaleElements(); + + $salesElement->setProduct($event->getProduct()); + } + + // Update sale element + $salesElement + ->setRef($event->getReference()) + ->setQuantity($event->getQuantity()) + ->setPromo($event->getOnsale()) + ->setNewness($event->getIsnew()) + ->setWeight($event->getWeight()) + ->setIsDefault($event->getIsDefault()) + ->setEanCode($event->getEanCode()) + ->save() + ; + + // Update/create price for current currency + $productPrice = ProductPriceQuery::create() + ->filterByCurrencyId($event->getCurrencyId()) + ->filterByProductSaleElementsId($salesElement->getId()) + ->findOne($con); + + // If price is not defined, create it. + if ($productPrice == null) { + + $productPrice = new ProductPrice(); + + $productPrice + ->setProductSaleElements($salesElement) + ->setCurrencyId($event->getCurrencyId()) + ; + } + + $productPrice + ->setPromoPrice($event->getSalePrice()) + ->setPrice($event->getPrice()) + ->save($con) + ; + + // Store all the stuff ! + $con->commit(); + } + catch (\Exception $ex) { + + $con->rollback(); + + throw $ex; + } + } + + /** + * Delete a product sale element + * + * @param ProductSaleElementDeleteEvent $event + */ + public function delete(ProductSaleElementDeleteEvent $event) + { + if (null !== $pse = ProductSaleElementsQuery::create()->findPk($event->getProductSaleElementId())) { + + $product = $pse->getProduct(); + + $con = Propel::getWriteConnection(ProductSaleElementsTableMap::DATABASE_NAME); + + $con->beginTransaction(); + + try { + + $pse->delete($con); + + if ($product->countSaleElements() <= 0) { + // If we just deleted the last PSE, create a default one + $product->createDefaultProductSaleElement($con, 0, 0, $event->getCurrencyId(), true); + } + else if ($product->getDefaultSaleElements() == null) { + + // If we deleted the default PSE, make the last created one the default + $pse = ProductSaleElementsQuery::create()->filterByProductId($this->id)->orderByCreatedAt(Criteria::DESC)->findOne($con); + + $pse->setIsDefault(true)->save($con); + } + + // Store all the stuff ! + $con->commit(); + } + catch (\Exception $ex) { + + $con->rollback(); + + throw $ex; + } + } + } + + /** + * {@inheritDoc} + */ + public static function getSubscribedEvents() + { + return array( + TheliaEvents::PRODUCT_ADD_PRODUCT_SALE_ELEMENT => array("create", 128), + TheliaEvents::PRODUCT_UPDATE_PRODUCT_SALE_ELEMENT => array("update", 128), + TheliaEvents::PRODUCT_DELETE_PRODUCT_SALE_ELEMENT => array("delete", 128), + ); + } +} diff --git a/core/lib/Thelia/Action/Profile.php b/core/lib/Thelia/Action/Profile.php index 7c3e5423a..544882700 100644 --- a/core/lib/Thelia/Action/Profile.php +++ b/core/lib/Thelia/Action/Profile.php @@ -27,8 +27,15 @@ use Propel\Runtime\ActiveQuery\Criteria; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Thelia\Core\Event\Profile\ProfileEvent; use Thelia\Core\Event\TheliaEvents; +use Thelia\Core\Security\AccessManager; +use Thelia\Model\ModuleQuery; use Thelia\Model\Profile as ProfileModel; +use Thelia\Model\ProfileModule; +use Thelia\Model\ProfileModuleQuery; use Thelia\Model\ProfileQuery; +use Thelia\Model\ProfileResource; +use Thelia\Model\ProfileResourceQuery; +use Thelia\Model\ResourceQuery; class Profile extends BaseAction implements EventSubscriberInterface { @@ -76,6 +83,54 @@ class Profile extends BaseAction implements EventSubscriberInterface } } + /** + * @param ProfileEvent $event + */ + public function updateResourceAccess(ProfileEvent $event) + { + if (null !== $profile = ProfileQuery::create()->findPk($event->getId())) { + ProfileResourceQuery::create()->filterByProfileId($event->getId())->delete(); + foreach($event->getResourceAccess() as $resourceCode => $accesses) { + $manager = new AccessManager(0); + $manager->build($accesses); + + $profileResource = new ProfileResource(); + $profileResource->setProfileId($event->getId()) + ->setResource(ResourceQuery::create()->findOneByCode($resourceCode)) + ->setAccess( $manager->getAccessValue() ); + + $profileResource->save(); + + } + + $event->setProfile($profile); + } + } + + /** + * @param ProfileEvent $event + */ + public function updateModuleAccess(ProfileEvent $event) + { + if (null !== $profile = ProfileQuery::create()->findPk($event->getId())) { + ProfileModuleQuery::create()->filterByProfileId($event->getId())->delete(); + foreach($event->getModuleAccess() as $moduleCode => $accesses) { + $manager = new AccessManager(0); + $manager->build($accesses); + + $profileModule = new ProfileModule(); + $profileModule->setProfileId($event->getId()) + ->setModule(ModuleQuery::create()->findOneByCode($moduleCode)) + ->setAccess( $manager->getAccessValue() ); + + $profileModule->save(); + + } + + $event->setProfile($profile); + } + } + /** * @param ProfileEvent $event */ @@ -97,9 +152,11 @@ class Profile extends BaseAction implements EventSubscriberInterface public static function getSubscribedEvents() { return array( - TheliaEvents::PROFILE_CREATE => array("create", 128), - TheliaEvents::PROFILE_UPDATE => array("update", 128), - TheliaEvents::PROFILE_DELETE => array("delete", 128), + TheliaEvents::PROFILE_CREATE => array("create", 128), + TheliaEvents::PROFILE_UPDATE => array("update", 128), + TheliaEvents::PROFILE_DELETE => array("delete", 128), + TheliaEvents::PROFILE_RESOURCE_ACCESS_UPDATE => array("updateResourceAccess", 128), + TheliaEvents::PROFILE_MODULE_ACCESS_UPDATE => array("updateModuleAccess", 128), ); } } diff --git a/core/lib/Thelia/Command/GenerateResources.php b/core/lib/Thelia/Command/GenerateResources.php index 217672797..fcad56b41 100644 --- a/core/lib/Thelia/Command/GenerateResources.php +++ b/core/lib/Thelia/Command/GenerateResources.php @@ -28,7 +28,9 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Thelia\Command\ContainerAwareCommand; +use Thelia\Core\Security\Resource\AdminResources; use Thelia\Model\Admin; +use Thelia\Model\Map\ResourceI18nTableMap; use Thelia\Model\Map\ResourceTableMap; class GenerateResources extends ContainerAwareCommand @@ -46,7 +48,7 @@ class GenerateResources extends ContainerAwareCommand 'output', null, InputOption::VALUE_OPTIONAL, - 'Output format amid (string, sql)', + 'Output format amid (string, sql, sql-i18n)', null ) ; @@ -55,7 +57,7 @@ class GenerateResources extends ContainerAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { - $class = new \ReflectionClass('Thelia\Core\Event\AdminResources'); + $class = new \ReflectionClass('Thelia\Core\Security\Resource\AdminResources'); $constants = $class->getConstants(); @@ -69,18 +71,42 @@ class GenerateResources extends ContainerAwareCommand $output->writeln( 'INSERT INTO ' . ResourceTableMap::TABLE_NAME . ' (`id`, `code`, `created_at`, `updated_at`) VALUES ' ); + $compteur = 0; foreach($constants as $constant => $value) { - if($constant == 'SUPERADMINISTRATOR') { + if($constant == AdminResources::SUPERADMINISTRATOR) { continue; } + $compteur++; $output->writeln( - "(NULL, '$value', NOW(), NOW())" . ($constant === key( array_slice( $constants, -1, 1, TRUE ) ) ? '' : ',') + "($compteur, '$value', NOW(), NOW())" . ($constant === key( array_slice( $constants, -1, 1, true ) ) ? ';' : ',') + ); + } + break; + case 'sql-i18n': + $output->writeln( + 'INSERT INTO ' . ResourceI18nTableMap::TABLE_NAME . ' (`id`, `locale`, `title`) VALUES ' + ); + $compteur = 0; + foreach($constants as $constant => $value) { + if($constant == AdminResources::SUPERADMINISTRATOR) { + continue; + } + + $compteur++; + + $title = ucwords( str_replace('.', ' / ', str_replace('admin.', '', $value) ) ); + + $output->writeln( + "($compteur, 'en_US', '$title')," + ); + $output->writeln( + "($compteur, 'fr_FR', '$title')" . ($constant === key( array_slice( $constants, -1, 1, true ) ) ? ';' : ',') ); } break; default : foreach($constants as $constant => $value) { - if($constant == 'SUPERADMINISTRATOR') { + if($constant == AdminResources::SUPERADMINISTRATOR) { continue; } $output->writeln('[' . $constant . "] => " . $value); diff --git a/core/lib/Thelia/Condition/ConditionFactory.php b/core/lib/Thelia/Condition/ConditionFactory.php index ff024ecae..3e1c771ee 100644 --- a/core/lib/Thelia/Condition/ConditionFactory.php +++ b/core/lib/Thelia/Condition/ConditionFactory.php @@ -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*/ @@ -82,10 +82,6 @@ class ConditionFactory if ($conditions !== null) { /** @var $condition ConditionManagerInterface */ foreach ($conditions as $condition) { - // Remove all condition if the "no condition" condition is found -// if ($condition->getServiceId() == 'thelia.condition.match_for_everyone') { -// return base64_encode(json_encode(array($condition->getSerializableRule()))); -// } $serializableConditions[] = $condition->getSerializableCondition(); } } diff --git a/core/lib/Thelia/Condition/ConditionManagerAbstract.php b/core/lib/Thelia/Condition/ConditionManagerAbstract.php index e5c8aed1a..bf38ef387 100644 --- a/core/lib/Thelia/Condition/ConditionManagerAbstract.php +++ b/core/lib/Thelia/Condition/ConditionManagerAbstract.php @@ -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; @@ -43,10 +43,6 @@ use Thelia\Type\FloatType; */ abstract class ConditionManagerAbstract implements ConditionManagerInterface { -// /** Operator key in $validators */ -// CONST OPERATOR = 'operator'; -// /** Value key in $validators */ -// CONST VALUE = 'value'; /** @var string Service Id from Resources/config.xml */ protected $serviceId = null; @@ -57,10 +53,7 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface /** @var array Parameters validating parameters against */ protected $validators = array(); -// /** @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,71 +71,15 @@ 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(); $this->conditionValidator = $adapter->getConditionEvaluator(); } -// /** -// * Check validator relevancy and store them -// * -// * @param array $validators Array of RuleValidator -// * validating $paramsToValidate against -// * -// * @return $this -// * @throws InvalidConditionException -// */ -// protected function setValidators(array $validators) -// { -// foreach ($validators as $validator) { -// if (!$validator instanceof RuleValidator) { -// throw new InvalidConditionException(get_class()); -// } -// if (!in_array($validator->getOperator(), $this->availableOperators)) { -// throw new InvalidConditionOperatorException( -// get_class(), -// $validator->getOperator() -// ); -// } -// } -// $this->validators = $validators; -// -// return $this; -// } - - - -// /** -// * Check if the current Checkout matches this condition -// * -// * @return bool -// */ -// public function isMatching() -// { -// $this->checkBackOfficeInput(); -// $this->checkCheckoutInput(); -// -// $isMatching = true; -// /** @var $validator RuleValidator*/ -// foreach ($this->validators as $param => $validator) { -// $a = $this->paramsToValidate[$param]; -// $operator = $validator->getOperator(); -// /** @var ComparableInterface, RuleParameterAbstract $b */ -// $b = $validator->getParam(); -// -// if (!Operators::isValid($a, $operator, $b)) { -// $isMatching = false; -// } -// } -// -// return $isMatching; -// -// } - /** * Return all available Operators for this Condition * @@ -153,37 +90,6 @@ abstract class ConditionManagerAbstract implements ConditionManagerInterface return $this->availableOperators; } -// /** -// * Check if Operators set for this Rule in the BackOffice are legit -// * -// * @throws InvalidConditionOperatorException if Operator is not allowed -// * @return bool -// */ -// protected function checkBackOfficeInputsOperators() -// { -// /** @var RuleValidator $param */ -// foreach ($this->validators as $key => $param) { -// $operator = $param->getOperator(); -// if (!isset($operator) -// ||!in_array($operator, $this->availableOperators) -// ) { -// throw new InvalidConditionOperatorException(get_class(), $key); -// } -// } -// return true; -// } - -// /** -// * Generate current Rule param to be validated from adapter -// * -// * @throws \Thelia\Exception\NotImplementedException -// * @return $this -// */ -// protected function setParametersToValidate() -// { -// throw new \Thelia\Exception\NotImplementedException(); -// } - /** * Return all validators * diff --git a/core/lib/Thelia/Condition/ConditionManagerInterface.php b/core/lib/Thelia/Condition/ConditionManagerInterface.php index 0e7fc99b1..ceda090bf 100644 --- a/core/lib/Thelia/Condition/ConditionManagerInterface.php +++ b/core/lib/Thelia/Condition/ConditionManagerInterface.php @@ -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 @@ -53,20 +53,6 @@ interface ConditionManagerInterface */ 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 * @@ -78,13 +64,6 @@ interface ConditionManagerInterface */ 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 * @@ -121,17 +100,6 @@ interface ConditionManagerInterface */ 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 * diff --git a/core/lib/Thelia/Condition/SerializableCondition.php b/core/lib/Thelia/Condition/SerializableCondition.php index 426052506..31163cdda 100644 --- a/core/lib/Thelia/Condition/SerializableCondition.php +++ b/core/lib/Thelia/Condition/SerializableCondition.php @@ -45,33 +45,4 @@ class SerializableCondition /** @var array Values set by Admin for this Condition */ public $values = array(); -// /** -// * Get Operators set by Admin for this Condition -// * -// * @return array -// */ -// public function getOperators() -// { -// return $this->operators; -// } -// -// /** -// * Get Condition Service id -// * -// * @return string -// */ -// public function getConditionServiceId() -// { -// return $this->conditionServiceId; -// } -// -// /** -// * Get Values set by Admin for this Condition -// * -// * @return array -// */ -// public function getValues() -// { -// return $this->values; -// } } diff --git a/core/lib/Thelia/Config/DefinePropel.php b/core/lib/Thelia/Config/DefinePropel.php index 3f7547fde..05a42a504 100755 --- a/core/lib/Thelia/Config/DefinePropel.php +++ b/core/lib/Thelia/Config/DefinePropel.php @@ -44,7 +44,9 @@ class DefinePropel "dsn" => $connection["dsn"], "user" => $connection["user"], "password" => $connection["password"], - "classname" => $connection["classname"] + "classname" => $connection["classname"], + 'options' => array( + \PDO::MYSQL_ATTR_INIT_COMMAND => array('value' =>'SET NAMES \'UTF8\'')) ); } } diff --git a/core/lib/Thelia/Config/Resources/action.xml b/core/lib/Thelia/Config/Resources/action.xml index e5d6c9492..1901edfec 100755 --- a/core/lib/Thelia/Config/Resources/action.xml +++ b/core/lib/Thelia/Config/Resources/action.xml @@ -51,6 +51,11 @@ + + + + + @@ -156,10 +161,20 @@ + + + + + + + + + + diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 71ee72cd8..6f635df9c 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -35,6 +35,7 @@ + @@ -87,6 +88,9 @@
+ + + @@ -105,6 +109,8 @@ + + @@ -136,16 +142,17 @@ + + + + + - - - - @@ -154,6 +161,11 @@ + + + + + @@ -312,7 +324,7 @@ - + diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index e4e29ee55..df8c9e4df 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -24,13 +24,6 @@ Thelia\Controller\Admin\SessionController::checkLoginAction - - - Thelia\Controller\Admin\AdminController::updateAction - - - - @@ -310,6 +303,10 @@ Thelia\Controller\Admin\ProductController::updateContentPositionAction + + Thelia\Controller\Admin\ProductController::priceCaclulator + + @@ -356,19 +353,19 @@ - Thelia\Controller\Admin\ProductController::addCombinationAction + Thelia\Controller\Admin\ProductController::addProductSaleElementAction - Thelia\Controller\Admin\ProductController::deleteCombinationAction + Thelia\Controller\Admin\ProductController::deleteProductSaleElementAction - Thelia\Controller\Admin\ProductController::updateCombinationAction + Thelia\Controller\Admin\ProductController::updateProductSaleElementAction - Thelia\Controller\Admin\ProductController::updateDefaultPriceAction + Thelia\Controller\Admin\ProductController::updateProductDefaultSaleElementAction @@ -777,12 +774,40 @@ Thelia\Controller\Admin\ProfileController::processUpdateAction + + Thelia\Controller\Admin\ProfileController::processUpdateResourceAccess + + + + Thelia\Controller\Admin\ProfileController::processUpdateModuleAccess + + Thelia\Controller\Admin\ProfileController::deleteAction + + + + Thelia\Controller\Admin\AdministratorController::defaultAction + + + + Thelia\Controller\Admin\AdministratorController::createAction + + + + Thelia\Controller\Admin\AdministratorController::processUpdateAction + + + + Thelia\Controller\Admin\AdministratorController::deleteAction + + + + @@ -912,6 +937,50 @@ + + + + Thelia\Controller\Admin\LangController::defaultAction + + + + Thelia\Controller\Admin\LangController::updateAction + \d+ + + + + Thelia\Controller\Admin\LangController::processUpdateAction + \d+ + + + + Thelia\Controller\Admin\LangController::toggleDefaultAction + \d+ + + + + Thelia\Controller\Admin\LangController::addAction + + + + Thelia\Controller\Admin\LangController::deleteAction + + + + Thelia\Controller\Admin\LangController::defaultBehaviorAction + + + + Thelia\Controller\Admin\LangController::domainAction + + + + Thelia\Controller\Admin\LangController::activateDomainAction + + + + Thelia\Controller\Admin\LangController::deactivateDomainAction + diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml index c3dc0fdcf..981e8130f 100755 --- a/core/lib/Thelia/Config/Resources/routing/front.xml +++ b/core/lib/Thelia/Config/Resources/routing/front.xml @@ -131,6 +131,11 @@ order-invoice + + Thelia\Controller\Front\CouponController::consumeAction + order-invoice + + Thelia\Controller\Front\OrderController::pay diff --git a/core/lib/Thelia/Controller/Admin/AdministratorController.php b/core/lib/Thelia/Controller/Admin/AdministratorController.php new file mode 100644 index 000000000..10780037a --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/AdministratorController.php @@ -0,0 +1,201 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Security\Resource\AdminResources; +use Thelia\Core\Event\Administrator\AdministratorEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Form\AdministratorCreationForm; +use Thelia\Form\AdministratorModificationForm; +use Thelia\Model\AdminQuery; + + +class AdministratorController extends AbstractCrudController +{ + public function __construct() + { + parent::__construct( + 'administrator', + 'manual', + 'order', + + AdminResources::ADMINISTRATOR, + + TheliaEvents::ADMINISTRATOR_CREATE, + TheliaEvents::ADMINISTRATOR_UPDATE, + TheliaEvents::ADMINISTRATOR_DELETE + ); + } + + protected function getCreationForm() + { + return new AdministratorCreationForm($this->getRequest()); + } + + protected function getUpdateForm() + { + return new AdministratorModificationForm($this->getRequest()); + } + + protected function getCreationEvent($formData) + { + $event = new AdministratorEvent(); + + $event->setLogin($formData['login']); + $event->setFirstname($formData['firstname']); + $event->setLastname($formData['lastname']); + $event->setPassword($formData['password']); + $event->setProfile($formData['profile'] ? : null); + + return $event; + } + + protected function getUpdateEvent($formData) + { + $event = new AdministratorEvent(); + + $event->setId($formData['id']); + $event->setLogin($formData['login']); + $event->setFirstname($formData['firstname']); + $event->setLastname($formData['lastname']); + $event->setPassword($formData['password']); + $event->setProfile($formData['profile'] ? : null); + + return $event; + } + + protected function getDeleteEvent() + { + $event = new AdministratorEvent(); + + $event->setId( + $this->getRequest()->get('administrator_id', 0) + ); + + return $event; + } + + protected function eventContainsObject($event) + { + return $event->hasAdministrator(); + } + + protected function hydrateObjectForm($object) + { + $data = array( + 'id' => $object->getId(), + 'firstname' => $object->getFirstname(), + 'lastname' => $object->getLastname(), + 'login' => $object->getLogin(), + 'profile' => $object->getProfileId(), + ); + + // Setup the object form + return new AdministratorModificationForm($this->getRequest(), "form", $data); + } + + protected function hydrateResourceUpdateForm($object) + { + $data = array( + 'id' => $object->getId(), + ); + + // Setup the object form + return new AdministratorUpdateResourceAccessForm($this->getRequest(), "form", $data); + } + + protected function hydrateModuleUpdateForm($object) + { + $data = array( + 'id' => $object->getId(), + ); + + // Setup the object form + return new AdministratorUpdateModuleAccessForm($this->getRequest(), "form", $data); + } + + protected function getObjectFromEvent($event) + { + return $event->hasAdministrator() ? $event->getAdministrator() : null; + } + + protected function getExistingObject() + { + return AdminQuery::create() + ->joinWithI18n($this->getCurrentEditionLocale()) + ->findOneById($this->getRequest()->get('administrator_id')); + } + + protected function getObjectLabel($object) + { + return $object->getLogin(); + } + + protected function getObjectId($object) + { + return $object->getId(); + } + + + protected function renderListTemplate($currentOrder) + { + // We always return to the feature edition form + return $this->render( + 'administrators', + array() + ); + } + + protected function renderEditionTemplate() + { + // We always return to the feature edition form + return $this->render('administrators'); + } + + protected function redirectToEditionTemplate() + { + // We always return to the feature edition form + $this->redirectToListTemplate(); + } + + protected function performAdditionalCreateAction($updateEvent) + { + // We always return to the feature edition form + $this->redirectToListTemplate(); + } + + protected function performAdditionalUpdateAction($updateEvent) + { + // We always return to the feature edition form + $this->redirectToListTemplate(); + } + + protected function redirectToListTemplate() + { + $this->redirectToRoute( + "admin.configuration.administrators.view" + ); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index 186727ed5..be6deca15 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -97,14 +97,17 @@ class BaseAdminController extends BaseController * * @return \Symfony\Component\HttpFoundation\Response */ - protected function errorPage($message) + protected function errorPage($message, $status = 500) { if ($message instanceof \Exception) { $message = $this->getTranslator()->trans("Sorry, an error occured: %msg", array('%msg' => $message->getMessage())); } - return $this->render('general_error', array( - "error_message" => $message) + return $this->render('general_error', + array( + "error_message" => $message + ), + $status ); } @@ -128,12 +131,12 @@ class BaseAdminController extends BaseController } // Log the problem - $this->adminLogAppend("User is not granted for permissions %s", implode(", ", $permArr)); + $this->adminLogAppend("User is not granted for resources %s with accesses %s", implode(", ", $resources), implode(", ", $accesses)); // Generate the proper response $response = new Response(); - return $this->errorPage($this->getTranslator()->trans("Sorry, you're not allowed to perform this action")); + return $this->errorPage($this->getTranslator()->trans("Sorry, you're not allowed to perform this action"), 403); } /* @@ -366,14 +369,13 @@ class BaseAdminController extends BaseController * Render the given template, and returns the result as an Http Response. * * @param $templateName the complete template name, with extension - * @param array $args the template arguments + * @param array $args the template arguments + * @param int $status http code status * @return \Symfony\Component\HttpFoundation\Response */ - protected function render($templateName, $args = array()) + protected function render($templateName, $args = array(), $status = 200) { - $response = new Response(); - - return $response->setContent($this->renderRaw($templateName, $args)); + return Response::create($this->renderRaw($templateName, $args), $status); } /** @@ -430,7 +432,7 @@ class BaseAdminController extends BaseController Redirect::exec(URL::getInstance()->absoluteUrl($ex->getLoginTemplate())); } catch (AuthorizationException $ex) { // User is not allowed to perform the required action. Return the error page instead of the requested page. - return $this->errorPage($this->getTranslator()->trans("Sorry, you are not allowed to perform this action.")); + return $this->errorPage($this->getTranslator()->trans("Sorry, you are not allowed to perform this action."), 403); } } } diff --git a/core/lib/Thelia/Controller/Admin/CountryController.php b/core/lib/Thelia/Controller/Admin/CountryController.php index e5bcce67b..0ef2f1006 100644 --- a/core/lib/Thelia/Controller/Admin/CountryController.php +++ b/core/lib/Thelia/Controller/Admin/CountryController.php @@ -251,6 +251,6 @@ class CountryController extends AbstractCrudController } - return $this->nullResponse($content, 500); + return $this->nullResponse(500); } } diff --git a/core/lib/Thelia/Controller/Admin/CouponController.php b/core/lib/Thelia/Controller/Admin/CouponController.php index 3d5b2d72f..59ef312d5 100755 --- a/core/lib/Thelia/Controller/Admin/CouponController.php +++ b/core/lib/Thelia/Controller/Admin/CouponController.php @@ -28,8 +28,6 @@ use Symfony\Component\Routing\Router; use Thelia\Condition\ConditionFactory; use Thelia\Condition\ConditionManagerInterface; use Thelia\Core\Security\Resource\AdminResources; -use Thelia\Core\Event\Condition\ConditionCreateOrUpdateEvent; -use Thelia\Core\Event\Coupon\CouponConsumeEvent; use Thelia\Core\Event\Coupon\CouponCreateOrUpdateEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Security\AccessManager; @@ -209,10 +207,7 @@ class CouponController extends BaseAdminController $conditions = $conditionFactory->unserializeConditionCollection( $coupon->getSerializedConditions() ); -var_dump($coupon->getIsEnabled());; -var_dump($coupon->getIsAvailableOnSpecialOffers());; -var_dump($coupon->getIsCumulative());; -var_dump($coupon->getIsRemovingPostage());; + $data = array( 'code' => $coupon->getCode(), 'title' => $coupon->getTitle(), @@ -220,11 +215,11 @@ var_dump($coupon->getIsRemovingPostage());; 'type' => $coupon->getType(), 'shortDescription' => $coupon->getShortDescription(), 'description' => $coupon->getDescription(), - 'isEnabled' => ($coupon->getIsEnabled() == 1), + 'isEnabled' => $coupon->getIsEnabled(), 'expirationDate' => $coupon->getExpirationDate('Y-m-d'), - 'isAvailableOnSpecialOffers' => ($coupon->getIsAvailableOnSpecialOffers() == 1), - 'isCumulative' => ($coupon->getIsCumulative() == 1), - 'isRemovingPostage' => ($coupon->getIsRemovingPostage() == 1), + 'isAvailableOnSpecialOffers' => $coupon->getIsAvailableOnSpecialOffers(), + 'isCumulative' => $coupon->getIsCumulative(), + 'isRemovingPostage' => $coupon->getIsRemovingPostage(), 'maxUsage' => $coupon->getMaxUsage(), 'conditions' => $conditions, 'locale' => $coupon->getLocale(), @@ -265,7 +260,7 @@ var_dump($coupon->getIsRemovingPostage());; Router::ABSOLUTE_URL ); - $args['formAction'] = 'admin/coupon/update' . $couponId; + $args['formAction'] = 'admin/coupon/update/' . $couponId; return $this->render('coupon-update', $args); } @@ -335,27 +330,36 @@ var_dump($coupon->getIsRemovingPostage());; $conditions->add(clone $condition); } -// $coupon->setSerializedConditions( -// $conditionFactory->serializeCouponConditionCollection($conditions) -// ); - - $conditionEvent = new ConditionCreateOrUpdateEvent( - $conditions + $couponEvent = new CouponCreateOrUpdateEvent( + $coupon->getCode(), + $coupon->getTitle(), + $coupon->getAmount(), + $coupon->getType(), + $coupon->getShortDescription(), + $coupon->getDescription(), + $coupon->getIsEnabled(), + $coupon->getExpirationDate(), + $coupon->getIsAvailableOnSpecialOffers(), + $coupon->getIsCumulative(), + $coupon->getIsRemovingPostage(), + $coupon->getMaxUsage(), + $coupon->getLocale() ); - $conditionEvent->setCouponModel($coupon); + $couponEvent->setCouponModel($coupon); + $couponEvent->setConditions($conditions); $eventToDispatch = TheliaEvents::COUPON_CONDITION_UPDATE; // Dispatch Event to the Action $this->dispatch( $eventToDispatch, - $conditionEvent + $couponEvent ); $this->adminLogAppend( sprintf( 'Coupon %s (ID %s) conditions updated', - $conditionEvent->getCouponModel()->getTitle(), - $conditionEvent->getCouponModel()->getServiceId() + $couponEvent->getCouponModel()->getTitle(), + $couponEvent->getCouponModel()->getType() ) ); @@ -372,31 +376,6 @@ var_dump($coupon->getIsRemovingPostage());; ); } - /** - * Test Coupon consuming - * - * @param string $couponCode Coupon code - * - * @todo remove (event dispatcher testing purpose) - * - */ - public function consumeAction($couponCode) - { - // @todo remove (event dispatcher testing purpose) - $couponConsumeEvent = new CouponConsumeEvent($couponCode); - $eventToDispatch = TheliaEvents::COUPON_CONSUME; - - // Dispatch Event to the Action - $this->dispatch( - $eventToDispatch, - $couponConsumeEvent - ); - - var_dump('test', $couponConsumeEvent->getCode(), $couponConsumeEvent->getDiscount(), $couponConsumeEvent->getIsValid()); - - exit(); - } - /** * Build a Coupon from its form * @@ -492,14 +471,14 @@ var_dump($coupon->getIsRemovingPostage());; sprintf( 'Coupon %s (ID ) ' . $log, $couponEvent->getTitle(), - $couponEvent->getCoupon()->getId() + $couponEvent->getCouponModel()->getId() ) ); $this->redirect( str_replace( '{id}', - $couponEvent->getCoupon()->getId(), + $couponEvent->getCouponModel()->getId(), $creationForm->getSuccessUrl() ) ); @@ -591,26 +570,4 @@ var_dump($coupon->getIsRemovingPostage());; return $cleanedConditions; } -// /** -// * Validation Condition creation -// * -// * @param string $type Condition class type -// * @param string $operator Condition operator (<, >, =, etc) -// * @param array $values Condition values -// * -// * @return bool -// */ -// protected function validateConditionsCreation($type, $operator, $values) -// { -// /** @var AdapterInterface $adapter */ -// $adapter = $this->container->get('thelia.adapter'); -// $validator = new PriceParam() -// try { -// $condition = new AvailableForTotalAmount($adapter, $validators); -// $condition = new $type($adapter, $validators); -// } catch (\Exception $e) { -// return false; -// } -// } - } diff --git a/core/lib/Thelia/Controller/Admin/FolderController.php b/core/lib/Thelia/Controller/Admin/FolderController.php index 8b709dbbe..e35d659d1 100644 --- a/core/lib/Thelia/Controller/Admin/FolderController.php +++ b/core/lib/Thelia/Controller/Admin/FolderController.php @@ -48,10 +48,7 @@ class FolderController extends AbstractCrudController 'manual', 'folder_order', - AdminResources::FOLDER_VIEW, - AdminResources::FOLDER_CREATE, - AdminResources::FOLDER_UPDATE, - AdminResources::FOLDER_DELETE, + AdminResources::FOLDER, TheliaEvents::FOLDER_CREATE, TheliaEvents::FOLDER_UPDATE, diff --git a/core/lib/Thelia/Controller/Admin/LangController.php b/core/lib/Thelia/Controller/Admin/LangController.php new file mode 100644 index 000000000..9b6074955 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/LangController.php @@ -0,0 +1,329 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +use Symfony\Component\Form\Form; +use Thelia\Core\Event\Lang\LangCreateEvent; +use Thelia\Core\Event\Lang\LangDefaultBehaviorEvent; +use Thelia\Core\Event\Lang\LangDeleteEvent; +use Thelia\Core\Event\Lang\LangToggleDefaultEvent; +use Thelia\Core\Event\Lang\LangUpdateEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Security\Resource\AdminResources; +use Thelia\Form\Exception\FormValidationException; +use Thelia\Form\Lang\LangCreateForm; +use Thelia\Form\Lang\LangDefaultBehaviorForm; +use Thelia\Form\Lang\LangUpdateForm; +use Thelia\Form\Lang\LangUrlEvent; +use Thelia\Form\Lang\LangUrlForm; +use Thelia\Model\ConfigQuery; +use Thelia\Model\LangQuery; + + +/** + * Class LangController + * @package Thelia\Controller\Admin + * @author Manuel Raynaud + */ +class LangController extends BaseAdminController +{ + + public function defaultAction() + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::VIEW)) return $response; + + return $this->renderDefault(); + } + + public function renderDefault(array $param = array()) + { + $data = array(); + foreach (LangQuery::create()->find() as $lang) { + $data[LangUrlForm::LANG_PREFIX.$lang->getId()] = $lang->getUrl(); + } + $langUrlForm = new LangUrlForm($this->getRequest(), 'form', $data); + $this->getParserContext()->addForm($langUrlForm); + + return $this->render('languages', array_merge($param, array( + 'lang_without_translation' => ConfigQuery::getDefaultLangWhenNoTranslationAvailable(), + 'one_domain_per_lang' => ConfigQuery::read("one_domain_foreach_lang", false) + ))); + } + + public function updateAction($lang_id) + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $this->checkXmlHttpRequest(); + + $lang = LangQuery::create()->findPk($lang_id); + + $langForm = new LangUpdateForm($this->getRequest(), 'form', array( + 'id' => $lang->getId(), + 'title' => $lang->getTitle(), + 'code' => $lang->getCode(), + 'locale' => $lang->getLocale(), + 'date_format' => $lang->getDateFormat(), + 'time_format' => $lang->getTimeFormat() + )); + + $this->getParserContext()->addForm($langForm); + + return $this->render('ajax/language-update-modal', array( + 'lang_id' => $lang_id + )); + } + + public function processUpdateAction($lang_id) + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $error_msg = false; + + $langForm = new LangUpdateForm($this->getRequest()); + + try { + $form = $this->validateForm($langForm); + + $event = new LangUpdateEvent($form->get('id')->getData()); + $event = $this->hydrateEvent($event, $form); + + $this->dispatch(TheliaEvents::LANG_UPDATE, $event); + + if (false === $event->hasLang()) { + throw new \LogicException( + $this->getTranslator()->trans("No %obj was updated.", array('%obj', 'Lang'))); + } + + $changedObject = $event->getLang(); + $this->adminLogAppend(sprintf("%s %s (ID %s) modified", 'Lang', $changedObject->getTitle(), $changedObject->getId())); + $this->redirectToRoute('/admin/configuration/languages'); + } catch(\Exception $e) { + $error_msg = $e->getMessage(); + } + + return $this->renderDefault(); + } + + protected function hydrateEvent($event,Form $form) + { + return $event + ->setTitle($form->get('title')->getData()) + ->setCode($form->get('code')->getData()) + ->setLocale($form->get('locale')->getData()) + ->setDateFormat($form->get('date_format')->getData()) + ->setTimeFormat($form->get('time_format')->getData()) + ; + } + + public function toggleDefaultAction($lang_id) + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $this->checkXmlHttpRequest(); + $error = false; + try { + $event = new LangToggleDefaultEvent($lang_id); + + $this->dispatch(TheliaEvents::LANG_TOGGLEDEFAULT, $event); + + if (false === $event->hasLang()) { + throw new \LogicException( + $this->getTranslator()->trans("No %obj was updated.", array('%obj', 'Lang'))); + } + + $changedObject = $event->getLang(); + $this->adminLogAppend(sprintf("%s %s (ID %s) modified", 'Lang', $changedObject->getTitle(), $changedObject->getId())); + + } catch (\Exception $e) { + \Thelia\Log\Tlog::getInstance()->error(sprintf("Error on changing default languages with message : %s", $e->getMessage())); + $error = $e->getMessage(); + } + + if($error) { + return $this->nullResponse(500); + } else { + return $this->nullResponse(); + } + } + + public function addAction() + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::CREATE)) return $response; + + $createForm = new LangCreateForm($this->getRequest()); + + $error_msg = false; + + try { + $form = $this->validateForm($createForm); + + $createEvent = new LangCreateEvent(); + $createEvent = $this->hydrateEvent($createEvent, $form); + + $this->dispatch(TheliaEvents::LANG_CREATE, $createEvent); + + if (false === $createEvent->hasLang()) { + throw new \LogicException( + $this->getTranslator()->trans("No %obj was updated.", array('%obj', 'Lang'))); + } + + $createdObject = $createEvent->getLang(); + $this->adminLogAppend(sprintf("%s %s (ID %s) created", 'Lang', $createdObject->getTitle(), $createdObject->getId())); + + $this->redirectToRoute('admin.configuration.languages'); + + } catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext( + $this->getTranslator()->trans("%obj creation", array('%obj' => 'Lang')), $error_msg, $createForm, $ex); + + // At this point, the form has error, and should be redisplayed. + return $this->renderDefault(); + + } + + public function deleteAction() + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::DELETE)) return $response; + + $error_msg = false; + + try { + + $deleteEvent = new LangDeleteEvent($this->getRequest()->get('language_id', 0)); + + $this->dispatch(TheliaEvents::LANG_DELETE, $deleteEvent); + + $this->redirectToRoute('admin.configuration.languages'); + } catch (\Exception $ex) { + \Thelia\Log\Tlog::getInstance()->error(sprintf("error during language removal with message : %s", $ex->getMessage())); + $error_msg = $ex->getMessage(); + } + + return $this->renderDefault(array( + 'error_delete_message' => $error_msg + )); + + } + + public function defaultBehaviorAction() + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $error_msg = false; + + $behaviorForm = new LangDefaultBehaviorForm($this->getRequest()); + + try { + $form = $this->validateForm($behaviorForm); + + $event = new LangDefaultBehaviorEvent($form->get('behavior')->getData()); + + $this->dispatch(TheliaEvents::LANG_DEFAULTBEHAVIOR, $event); + + $this->redirectToRoute('admin.configuration.languages'); + + } catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext( + $this->getTranslator()->trans("%obj creation", array('%obj' => 'Lang')), $error_msg, $behaviorForm, $ex); + + // At this point, the form has error, and should be redisplayed. + return $this->renderDefault(); + } + + public function domainAction() + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $error_msg = false; + $langUrlForm = new LangUrlForm($this->getRequest()); + + try { + $form = $this->validateForm($langUrlForm); + + $data = $form->getData(); + $event = new LangUrlEvent(); + foreach ($data as $key => $value) { + $pos= strpos($key, LangUrlForm::LANG_PREFIX); + if(false !== strpos($key, LangUrlForm::LANG_PREFIX)) { + $event->addUrl(substr($key,strlen(LangUrlForm::LANG_PREFIX)), $value); + } + } + + $this->dispatch(TheliaEvents::LANG_URL, $event); + + $this->redirectToRoute('admin.configuration.languages'); + } catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext( + $this->getTranslator()->trans("%obj creation", array('%obj' => 'Lang')), $error_msg, $langUrlForm, $ex); + + // At this point, the form has error, and should be redisplayed. + return $this->renderDefault(); + } + + public function activateDomainAction() + { + $this->domainActivation(1); + } + + public function deactivateDomainAction() + { + $this->domainActivation(0); + } + + private function domainActivation($activate) + { + if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response; + + $error_msg = false; + + ConfigQuery::create() + ->filterByName('one_domain_foreach_lang') + ->update(array('Value' => $activate)); + + $this->redirectToRoute('admin.configuration.languages'); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php index 96a29de32..d56898662 100644 --- a/core/lib/Thelia/Controller/Admin/ProductController.php +++ b/core/lib/Thelia/Controller/Admin/ProductController.php @@ -48,6 +48,23 @@ use Thelia\Model\CategoryQuery; use Thelia\Core\Event\Product\ProductAddAccessoryEvent; use Thelia\Core\Event\Product\ProductDeleteAccessoryEvent; use Thelia\Model\ProductSaleElementsQuery; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementDeleteEvent; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementUpdateEvent; +use Thelia\Core\Event\ProductSaleElement\ProductSaleElementCreateEvent; +use Thelia\Model\AttributeQuery; +use Thelia\Model\AttributeAvQuery; +use Thelia\Form\ProductSaleElementUpdateForm; +use Thelia\Model\ProductSaleElements; +use Thelia\Model\ProductPriceQuery; +use Thelia\Form\ProductDefaultSaleElementUpdateForm; +use Thelia\Model\ProductPrice; +use Thelia\Model\Currency; +use Symfony\Component\HttpFoundation\JsonResponse; +use Thelia\TaxEngine\Calculator; +use Thelia\Model\Country; +use Thelia\Model\CountryQuery; +use Thelia\Model\TaxRuleQuery; +use Thelia\Tools\NumberFormat; /** * Manages products @@ -172,10 +189,58 @@ class ProductController extends AbstractCrudController protected function hydrateObjectForm($object) { - // Get the default produc sales element - $salesElement = ProductSaleElementsQuery::create()->filterByProduct($object)->filterByIsDefault(true)->findOne(); + $defaultPseData = $combinationPseData = array(); -// $prices = $salesElement->getProductPrices(); + // Find product's sale elements + $saleElements = ProductSaleElementsQuery::create() + ->filterByProduct($object) + ->find(); + + foreach($saleElements as $saleElement) { + + // Get the product price for the current currency + + $productPrice = ProductPriceQuery::create() + ->filterByCurrency($this->getCurrentEditionCurrency()) + ->filterByProductSaleElements($saleElement) + ->findOne() + ; + + if ($productPrice == null) $productPrice = new ProductPrice(); + + $isDefaultPse = count($saleElement->getAttributeCombinations()) == 0; + + // If this PSE has no combination -> this is the default one + // affect it to the thelia.admin.product_sale_element.update form + if ($isDefaultPse) { + + $defaultPseData = array( + "product_id" => $object->getId(), + "product_sale_element_id" => $saleElement->getId(), + "reference" => $saleElement->getRef(), + "price" => $productPrice->getPrice(), + "use_exchange_rate" => $productPrice->getFromDefaultCurrency() ? 1 : 0, + "tax_rule" => $object->getTaxRuleId(), + "currency" => $productPrice->getCurrencyId(), + "weight" => $saleElement->getWeight(), + "quantity" => $saleElement->getQuantity(), + "sale_price" => $productPrice->getPromoPrice(), + "onsale" => $saleElement->getPromo() > 0 ? 1 : 0, + "isnew" => $saleElement->getNewness() > 0 ? 1 : 0, + "isdefault" => $saleElement->getIsDefault() > 0 ? 1 : 0, + "ean_code" => $saleElement->getEanCode() + ); + + } + else { + } + + $defaultPseForm = new ProductDefaultSaleElementUpdateForm($this->getRequest(), "form", $defaultPseData); + $this->getParserContext()->addForm($defaultPseForm); + + $combinationPseForm = new ProductSaleElementUpdateForm($this->getRequest(), "form", $combinationPseData); + $this->getParserContext()->addForm($combinationPseForm); + } // Prepare the data that will hydrate the form $data = array( @@ -226,7 +291,7 @@ class ProductController extends AbstractCrudController 'product_id' => $this->getRequest()->get('product_id', 0), 'folder_id' => $this->getRequest()->get('folder_id', 0), 'accessory_category_id' => $this->getRequest()->get('accessory_category_id', 0), - 'current_tab' => $this->getRequest()->get('current_tab', 'general') + 'current_tab' => $this->getRequest()->get('current_tab', 'general') ); } @@ -730,20 +795,21 @@ class ProductController extends AbstractCrudController /** * A a new combination to a product */ - public function addCombinationAction() + public function addProductSaleElementAction() { // Check current user authorization if (null !== $response = $this->checkAuth($this->resourceCode, AccessManager::UPDATE)) return $response; - $event = new ProductCreateCombinationEvent( + $event = new ProductSaleElementCreateEvent( $this->getExistingObject(), $this->getRequest()->get('combination_attributes', array()), $this->getCurrentEditionCurrency()->getId() ); try { - $this->dispatch(TheliaEvents::PRODUCT_ADD_COMBINATION, $event); - } catch (\Exception $ex) { + $this->dispatch(TheliaEvents::PRODUCT_ADD_PRODUCT_SALE_ELEMENT, $event); + } + catch (\Exception $ex) { // Any error return $this->errorPage($ex); } @@ -751,23 +817,23 @@ class ProductController extends AbstractCrudController $this->redirectToEditionTemplate(); } - /** * A a new combination to a product */ - public function deleteCombinationAction() + public function deleteProductSaleElementAction() { // Check current user authorization if (null !== $response = $this->checkAuth($this->resourceCode, AccessManager::UPDATE)) return $response; - $event = new ProductDeleteCombinationEvent( - $this->getExistingObject(), - $this->getRequest()->get('product_sale_element_id',0) + $event = new ProductSaleElementDeleteEvent( + $this->getRequest()->get('product_sale_element_id',0), + $this->getCurrentEditionCurrency()->getId() ); try { - $this->dispatch(TheliaEvents::PRODUCT_DELETE_COMBINATION, $event); - } catch (\Exception $ex) { + $this->dispatch(TheliaEvents::PRODUCT_DELETE_PRODUCT_SALE_ELEMENT, $event); + } + catch (\Exception $ex) { // Any error return $this->errorPage($ex); } @@ -775,4 +841,124 @@ class ProductController extends AbstractCrudController $this->redirectToEditionTemplate(); } + /** + * Change a product sale element + */ + protected function processProductSaleElementUpdate($changeForm) { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.products.update")) return $response; + + $error_msg = false; + + try { + + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + $event = new ProductSaleElementUpdateEvent( + $this->getExistingObject(), + $data['product_sale_element_id'] + ); + + $event + ->setReference($data['reference']) + ->setPrice($data['price']) + ->setCurrencyId($data['currency']) + ->setWeight($data['weight']) + ->setQuantity($data['quantity']) + ->setSalePrice($data['sale_price']) + ->setOnsale($data['onsale']) + ->setIsnew($data['isnew']) + ->setIsdefault($data['isdefault']) + ->setEanCode($data['ean_code']) + ->setTaxrule($data['tax_rule']) + ; + + $this->dispatch(TheliaEvents::PRODUCT_UPDATE_PRODUCT_SALE_ELEMENT, $event); + + // Log object modification + if (null !== $changedObject = $event->getProductSaleElement()) { + $this->adminLogAppend(sprintf("Product Sale Element (ID %s) for product reference %s modified", $changedObject->getId(), $event->getProduct()->getRef())); + } + + // If we have to stay on the same page, do not redirect to the succesUrl, just redirect to the edit page again. + if ($this->getRequest()->get('save_mode') == 'stay') { + $this->redirectToEditionTemplate($this->getRequest()); + } + + // Redirect to the success URL + $this->redirect($changeForm->getSuccessUrl()); + } + catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } + catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext( + $this->getTranslator()->trans("ProductSaleElement modification"), $error_msg, $changeForm, $ex); + + // At this point, the form has errors, and should be redisplayed. + return $this->renderEditionTemplate(); + } + + /** + * Change a product sale element attached to a combination + */ + public function updateProductSaleElementAction() { + return $this->processProductSaleElementUpdate( + new ProductSaleElementUpdateForm($this->getRequest()) + ); + } + + /** + * Update default product sale element (not attached to any combination) + */ + public function updateProductDefaultSaleElementAction() { + + return $this->processProductSaleElementUpdate( + new ProductDefaultSaleElementUpdateForm($this->getRequest()) + ); + } + + public function priceCaclulator() { + + $price = floatval($this->getRequest()->get('price', 0)); + $tax_rule = intval($this->getRequest()->get('tax_rule_id', 0)); // The tax rule ID + $action = $this->getRequest()->get('action', ''); // With ot without tax + $convert = intval($this->getRequest()->get('convert_from_default_currency', 0)); + + $calc = new Calculator(); + + $calc->loadTaxRule( + TaxRuleQuery::create()->findPk($tax_rule), + Country::getShopLocation() + ); + + if ($action == 'to_tax') { + $return_price = $calc->getTaxedPrice($price); + } + else if ($action == 'from_tax') { + $return_price = $calc->getUntaxedPrice($price); + } + else { + $return_price = $price; + } + + if ($convert != 0) { + $return_price = $prix * Currency::getDefaultCurrency()->getRate(); + } + + // Format the number using '.', to perform further calculation + $return_price = NumberFormat::getInstance($this->getRequest())->format($return_price, null, '.'); + + return new JsonResponse(array('result' => $return_price)); + } } diff --git a/core/lib/Thelia/Controller/Admin/ProfileController.php b/core/lib/Thelia/Controller/Admin/ProfileController.php index b28c418e4..774570139 100644 --- a/core/lib/Thelia/Controller/Admin/ProfileController.php +++ b/core/lib/Thelia/Controller/Admin/ProfileController.php @@ -23,12 +23,15 @@ namespace Thelia\Controller\Admin; +use Thelia\Core\Security\AccessManager; use Thelia\Core\Security\Resource\AdminResources; use Thelia\Core\Event\Profile\ProfileEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Form\ProfileCreationForm; use Thelia\Form\ProfileModificationForm; use Thelia\Form\ProfileProfileListUpdateForm; +use Thelia\Form\ProfileUpdateModuleAccessForm; +use Thelia\Form\ProfileUpdateResourceAccessForm; use Thelia\Model\ProfileQuery; class ProfileController extends AbstractCrudController @@ -116,6 +119,26 @@ class ProfileController extends AbstractCrudController return new ProfileModificationForm($this->getRequest(), "form", $data); } + protected function hydrateResourceUpdateForm($object) + { + $data = array( + 'id' => $object->getId(), + ); + + // Setup the object form + return new ProfileUpdateResourceAccessForm($this->getRequest(), "form", $data); + } + + protected function hydrateModuleUpdateForm($object) + { + $data = array( + 'id' => $object->getId(), + ); + + // Setup the object form + return new ProfileUpdateModuleAccessForm($this->getRequest(), "form", $data); + } + protected function getObjectFromEvent($event) { return $event->hasProfile() ? $event->getProfile() : null; @@ -197,14 +220,47 @@ class ProfileController extends AbstractCrudController ); } - protected function checkRequirements($formData) + public function updateAction() { - $type = $formData['type']; + if (null !== $response = $this->checkAuth($this->resourceCode, AccessManager::UPDATE)) return $response; + $object = $this->getExistingObject(); + if ($object != null) { + + // Hydrate the form and pass it to the parser + $resourceAccessForm = $this->hydrateResourceUpdateForm($object); + $moduleAccessForm = $this->hydrateModuleUpdateForm($object); + + // Pass it to the parser + $this->getParserContext()->addForm($resourceAccessForm); + $this->getParserContext()->addForm($moduleAccessForm); + } + + return parent::updateAction(); } - protected function getRequirements($type, $formData) + protected function getUpdateResourceAccessEvent($formData) + { + $event = new ProfileEvent(); + + $event->setId($formData['id']); + $event->setResourceAccess($this->getResourceAccess($formData)); + + return $event; + } + + protected function getUpdateModuleAccessEvent($formData) + { + $event = new ProfileEvent(); + + $event->setId($formData['id']); + $event->setModuleAccess($this->getModuleAccess($formData)); + + return $event; + } + + protected function getResourceAccess($formData) { $requirements = array(); foreach($formData as $data => $value) { @@ -212,15 +268,137 @@ class ProfileController extends AbstractCrudController continue; } - $couple = explode(':', $data); + $explosion = explode(':', $data); - if(count($couple) != 2 || $couple[0] != $type) { + $prefix = array_shift ( $explosion ); + + if($prefix != ProfileUpdateResourceAccessForm::RESOURCE_ACCESS_FIELD_PREFIX) { continue; } - $requirements[$couple[1]] = $value; + $requirements[implode('.', $explosion)] = $value; } return $requirements; } + + protected function getModuleAccess($formData) + { + $requirements = array(); + foreach($formData as $data => $value) { + if(!strstr($data, ':')) { + continue; + } + + $explosion = explode(':', $data); + + $prefix = array_shift ( $explosion ); + + if($prefix != ProfileUpdateModuleAccessForm::MODULE_ACCESS_FIELD_PREFIX) { + continue; + } + + $requirements[implode('.', $explosion)] = $value; + } + + return $requirements; + } + + public function processUpdateResourceAccess() + { + // Check current user authorization + if (null !== $response = $this->checkAuth($this->resourceCode, AccessManager::UPDATE)) return $response; + + $error_msg = false; + + // Create the form from the request + $changeForm = new ProfileUpdateResourceAccessForm($this->getRequest()); + + try { + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + $changeEvent = $this->getUpdateResourceAccessEvent($data); + + $this->dispatch(TheliaEvents::PROFILE_RESOURCE_ACCESS_UPDATE, $changeEvent); + + if (! $this->eventContainsObject($changeEvent)) + throw new \LogicException( + $this->getTranslator()->trans("No %obj was updated.", array('%obj', $this->objectName))); + + // Log object modification + if (null !== $changedObject = $this->getObjectFromEvent($changeEvent)) { + $this->adminLogAppend(sprintf("%s %s (ID %s) modified", ucfirst($this->objectName), $this->getObjectLabel($changedObject), $this->getObjectId($changedObject))); + } + + if ($response == null) { + $this->redirectToEditionTemplate($this->getRequest(), isset($data['country_list'][0]) ? $data['country_list'][0] : null); + } else { + return $response; + } + } catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext($this->getTranslator()->trans("%obj modification", array('%obj' => 'taxrule')), $error_msg, $changeForm, $ex); + + // At this point, the form has errors, and should be redisplayed. + return $this->renderEditionTemplate(); + } + + public function processUpdateModuleAccess() + { + // Check current user authorization + if (null !== $response = $this->checkAuth($this->resourceCode, AccessManager::UPDATE)) return $response; + + $error_msg = false; + + // Create the form from the request + $changeForm = new ProfileUpdateModuleAccessForm($this->getRequest()); + + try { + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + $changeEvent = $this->getUpdateModuleAccessEvent($data); + + $this->dispatch(TheliaEvents::PROFILE_MODULE_ACCESS_UPDATE, $changeEvent); + + if (! $this->eventContainsObject($changeEvent)) + throw new \LogicException( + $this->getTranslator()->trans("No %obj was updated.", array('%obj', $this->objectName))); + + // Log object modification + if (null !== $changedObject = $this->getObjectFromEvent($changeEvent)) { + $this->adminLogAppend(sprintf("%s %s (ID %s) modified", ucfirst($this->objectName), $this->getObjectLabel($changedObject), $this->getObjectId($changedObject))); + } + + if ($response == null) { + $this->redirectToEditionTemplate($this->getRequest(), isset($data['country_list'][0]) ? $data['country_list'][0] : null); + } else { + return $response; + } + } catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + $this->setupFormErrorContext($this->getTranslator()->trans("%obj modification", array('%obj' => 'taxrule')), $error_msg, $changeForm, $ex); + + // At this point, the form has errors, and should be redisplayed. + return $this->renderEditionTemplate(); + } } \ No newline at end of file diff --git a/core/lib/Thelia/Controller/Admin/TestController.php b/core/lib/Thelia/Controller/Admin/TestController.php new file mode 100644 index 000000000..5fbdb58e8 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/TestController.php @@ -0,0 +1,93 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +use Thelia\Form\TestForm; +/** + * Manages variables + * + * @author Franck Allimant + */ +class TestController extends BaseAdminController +{ + /** + * Load a object for modification, and display the edit template. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function updateAction() + { + // Prepare the data that will hydrate the form + $data = array( + 'title' => "test title", + 'test' => array('a', 'b', 'toto' => 'c') + ); + + // Setup the object form + $changeForm = new TestForm($this->getRequest(), "form", $data); + + // Pass it to the parser + $this->getParserContext()->addForm($changeForm); + + return $this->render('test-form'); + } + + /** + * Save changes on a modified object, and either go back to the object list, or stay on the edition page. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function processUpdateAction() + { + $error_msg = false; + + // Create the form from the request + $changeForm = new TestForm($this->getRequest()); + + try { + + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + echo "data="; + + var_dump($data); + } + catch (FormValidationException $ex) { + // Form cannot be validated + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } + catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + echo "Error = $error_msg"; + + exit; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Controller/BaseController.php b/core/lib/Thelia/Controller/BaseController.php index 548ef9681..066958025 100755 --- a/core/lib/Thelia/Controller/BaseController.php +++ b/core/lib/Thelia/Controller/BaseController.php @@ -57,8 +57,10 @@ class BaseController extends ContainerAware /** * Return an empty response (after an ajax request, for example) + * @param int $status + * @return \Symfony\Component\HttpFoundation\Response */ - protected function nullResponse($content = null, $status = 200) + protected function nullResponse($status = 200) { return new Response(null, $status); } @@ -160,8 +162,12 @@ class BaseController extends ContainerAware } foreach ($form->all() as $child) { + if (!$child->isValid()) { - $errors .= $this->getErrorMessages($child) . ', '; + + $fieldName = $child->getConfig()->getOption('label', $child->getName()); + + $errors .= sprintf("[%s] %s, ", $fieldName, $this->getErrorMessages($child)); } } @@ -190,13 +196,15 @@ class BaseController extends ContainerAware $errorMessage = null; if ($form->get("error_message")->getData() != null) { $errorMessage = $form->get("error_message")->getData(); - } else { + } + else { $errorMessage = sprintf("Missing or invalid data: %s", $this->getErrorMessages($form)); } throw new FormValidationException($errorMessage); } - } else { + } + else { throw new FormValidationException(sprintf("Wrong form method, %s expected.", $expectedMethod)); } } @@ -221,7 +229,8 @@ class BaseController extends ContainerAware { if ($form != null) { $url = $form->getSuccessUrl(); - } else { + } + else { $url = $this->getRequest()->get("success_url"); } diff --git a/core/lib/Thelia/Controller/Front/CartController.php b/core/lib/Thelia/Controller/Front/CartController.php index afbcfaf7f..5ba8fed48 100755 --- a/core/lib/Thelia/Controller/Front/CartController.php +++ b/core/lib/Thelia/Controller/Front/CartController.php @@ -81,7 +81,7 @@ class CartController extends BaseFrontController $cartEvent->setQuantity($this->getRequest()->get("quantity")); try { - $this->getDispatcher()->dispatch(TheliaEvents::CART_UPDATEITEM, $cartEvent); + $this->dispatch(TheliaEvents::CART_UPDATEITEM, $cartEvent); $this->redirectSuccess(); } catch (PropelException $e) { diff --git a/core/lib/Thelia/Controller/Front/CouponController.php b/core/lib/Thelia/Controller/Front/CouponController.php new file mode 100755 index 000000000..dd0e6d722 --- /dev/null +++ b/core/lib/Thelia/Controller/Front/CouponController.php @@ -0,0 +1,95 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Controller\Front; + +use Propel\Runtime\Exception\PropelException; +use Thelia\Core\Event\Coupon\CouponConsumeEvent; +use Thelia\Exception\TheliaProcessException; +use Thelia\Form\CouponCode; +use Thelia\Form\Exception\FormValidationException; +use Thelia\Core\Event\Order\OrderEvent; +use Thelia\Core\Event\TheliaEvents; +use Symfony\Component\HttpFoundation\Request; +use Thelia\Form\OrderDelivery; +use Thelia\Form\OrderPayment; +use Thelia\Log\Tlog; +use Thelia\Model\AddressQuery; +use Thelia\Model\AreaDeliveryModuleQuery; +use Thelia\Model\Base\OrderQuery; +use Thelia\Model\ModuleQuery; +use Thelia\Model\Order; +use Thelia\Tools\URL; + +/** + * Class CouponController + * @package Thelia\Controller\Front + * @author Guillaume MOREL + */ +class CouponController extends BaseFrontController +{ + + /** + * Test Coupon consuming + */ + public function consumeAction() + { + $this->checkAuth(); + $this->checkCartNotEmpty(); + + $message = false; + $couponCodeForm = new CouponCode($this->getRequest()); + + try { + $form = $this->validateForm($couponCodeForm, 'post'); + + $couponCode = $form->get('coupon-code')->getData(); + + if (null === $couponCode || empty($couponCode)) { + $message = true; + throw new \Exception('Coupon code can\'t be empty'); + } + + $couponConsumeEvent = new CouponConsumeEvent($couponCode); + + // Dispatch Event to the Action + $this->getDispatcher()->dispatch(TheliaEvents::COUPON_CONSUME, $couponConsumeEvent); + + } catch (FormValidationException $e) { + $message = sprintf('Please check your coupon code: %s', $e->getMessage()); + } catch (PropelException $e) { + $this->getParserContext()->setGeneralError($e->getMessage()); + } catch (\Exception $e) { + $message = sprintf('Sorry, an error occurred: %s', $e->getMessage()); + } + + if ($message !== false) { + Tlog::getInstance()->error(sprintf("Error during order delivery process : %s. Exception was %s", $message, $e->getMessage())); + + $couponCodeForm->setErrorMessage($message); + + $this->getParserContext() + ->addForm($couponCodeForm) + ->setGeneralError($message); + } + } +} diff --git a/core/lib/Thelia/Core/Bundle/TheliaBundle.php b/core/lib/Thelia/Core/Bundle/TheliaBundle.php index a9704b350..dcdcdd5d2 100755 --- a/core/lib/Thelia/Core/Bundle/TheliaBundle.php +++ b/core/lib/Thelia/Core/Bundle/TheliaBundle.php @@ -30,7 +30,7 @@ use Thelia\Core\DependencyInjection\Compiler\RegisterCouponPass; use Thelia\Core\DependencyInjection\Compiler\RegisterListenersPass; use Thelia\Core\DependencyInjection\Compiler\RegisterParserPluginPass; use Thelia\Core\DependencyInjection\Compiler\RegisterRouterPass; -use Thelia\Core\DependencyInjection\Compiler\RegisterRulePass; +use Thelia\Core\DependencyInjection\Compiler\RegisterCouponConditionPass; /** * First Bundle use in Thelia @@ -63,8 +63,6 @@ class TheliaBundle extends Bundle ->addCompilerPass(new RegisterParserPluginPass()) ->addCompilerPass(new RegisterRouterPass()) ->addCompilerPass(new RegisterCouponPass()) - ->addCompilerPass(new RegisterRulePass()) - ; - + ->addCompilerPass(new RegisterCouponConditionPass()); } } diff --git a/core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterRulePass.php b/core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterCouponConditionPass.php similarity index 92% rename from core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterRulePass.php rename to core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterCouponConditionPass.php index dcc54cf8e..7caf79c5e 100755 --- a/core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterRulePass.php +++ b/core/lib/Thelia/Core/DependencyInjection/Compiler/RegisterCouponConditionPass.php @@ -35,11 +35,13 @@ use Symfony\Component\DependencyInjection\Reference; * Class RegisterListenersPass * Source code come from Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass class * + * Register all available Conditions for the coupon module + * * @package Thelia\Core\DependencyInjection\Compiler * @author Guillaume MOREL * */ -class RegisterRulePass implements CompilerPassInterface +class RegisterCouponConditionPass implements CompilerPassInterface { /** * You can modify the container here before it is dumped to PHP code. @@ -55,11 +57,11 @@ class RegisterRulePass implements CompilerPassInterface } $couponManager = $container->getDefinition('thelia.coupon.manager'); - $services = $container->findTaggedServiceIds("thelia.coupon.addRule"); + $services = $container->findTaggedServiceIds("thelia.coupon.addCondition"); - foreach ($services as $id => $rule) { + foreach ($services as $id => $condition) { $couponManager->addMethodCall( - 'addAvailableRule', + 'addAvailableCondition', array( new Reference($id) ) diff --git a/core/lib/Thelia/Core/Event/Administrator/AdministratorEvent.php b/core/lib/Thelia/Core/Event/Administrator/AdministratorEvent.php new file mode 100644 index 000000000..070e57f87 --- /dev/null +++ b/core/lib/Thelia/Core/Event/Administrator/AdministratorEvent.php @@ -0,0 +1,120 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Administrator; + +use Thelia\Core\Event\ActionEvent; +use Thelia\Model\Admin; + +class AdministratorEvent extends ActionEvent +{ + protected $administrator = null; + protected $id = null; + protected $firstname = null; + protected $lastname = null; + protected $login = null; + protected $password = null; + protected $profile = null; + + public function __construct(Admin $administrator = null) + { + $this->administrator = $administrator; + } + + public function hasAdministrator() + { + return ! is_null($this->administrator); + } + + public function getAdministrator() + { + return $this->administrator; + } + + public function setAdministrator(Admin $administrator) + { + $this->administrator = $administrator; + + return $this; + } + + public function setId($id) + { + $this->id = $id; + } + + public function getId() + { + return $this->id; + } + + public function setFirstname($firstname) + { + $this->firstname = $firstname; + } + + public function getFirstname() + { + return $this->firstname; + } + + public function setLastname($lastname) + { + $this->lastname = $lastname; + } + + public function getLastname() + { + return $this->lastname; + } + + public function setLogin($login) + { + $this->login = $login; + } + + public function getLogin() + { + return $this->login; + } + + public function setPassword($password) + { + $this->password = $password; + } + + public function getPassword() + { + return $this->password; + } + + public function setProfile($profile) + { + $this->profile = $profile; + } + + public function getProfile() + { + return $this->profile; + } +} diff --git a/core/lib/Thelia/Core/Event/Condition/ConditionCreateOrUpdateEvent.php b/core/lib/Thelia/Core/Event/Condition/ConditionCreateOrUpdateEvent.php deleted file mode 100644 index 58fdb10fe..000000000 --- a/core/lib/Thelia/Core/Event/Condition/ConditionCreateOrUpdateEvent.php +++ /dev/null @@ -1,106 +0,0 @@ -. */ -/* */ -/**********************************************************************************/ - -namespace Thelia\Core\Event\Condition; - -use Thelia\Core\Event\ActionEvent; -use Thelia\Coupon\ConditionCollection; -use Thelia\Coupon\Type\CouponInterface; - -/** - * Created by JetBrains PhpStorm. - * Date: 8/29/13 - * Time: 3:45 PM - * - * Occurring when a Condition is created or updated - * - * @package Coupon - * @author Guillaume MOREL - * - */ -class ConditionCreateOrUpdateEvent extends ActionEvent -{ - /** @var ConditionCollection Array of ConditionManagerInterface */ - protected $conditions = null; - - /** @var CouponInterface Coupon model associated with this conditions */ - protected $couponModel = null; - - /** - * Constructor - * - * @param ConditionCollection $conditions Array of ConditionManagerInterface - */ - public function __construct(ConditionCollection $conditions) - { - $this->conditions = $conditions; - } - - /** - * Get Conditions - * - * @return null|ConditionCollection Array of ConditionManagerInterface - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Set Conditions - * - * @param ConditionCollection $conditions Array of ConditionManagerInterface - * - * @return $this - */ - public function setConditions(ConditionCollection $conditions) - { - $this->conditions = $conditions; - - return $this; - } - - /** - * Set Coupon Model associated to this condition - * - * @param CouponInterface $couponModel Coupon Model - * - * @return $this - */ - public function setCouponModel($couponModel) - { - $this->couponModel = $couponModel; - - return $this; - } - - /** - * Get Coupon Model associated to this condition - * - * @return null|CouponInterface - */ - public function getCouponModel() - { - return $this->couponModel; - } -} diff --git a/core/lib/Thelia/Core/Event/Coupon/CouponCreateOrUpdateEvent.php b/core/lib/Thelia/Core/Event/Coupon/CouponCreateOrUpdateEvent.php index 3dfca3d4a..f890fd8cd 100644 --- a/core/lib/Thelia/Core/Event/Coupon/CouponCreateOrUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/Coupon/CouponCreateOrUpdateEvent.php @@ -31,7 +31,7 @@ use Thelia\Model\Coupon; * Date: 8/29/13 * Time: 3:45 PM * - * Occurring when a Coupon is created + * Occurring when a Coupon is created or updated * * @package Coupon * @author Guillaume MOREL @@ -76,10 +76,10 @@ class CouponCreateOrUpdateEvent extends ActionEvent protected $isAvailableOnSpecialOffers = false; /** @var Coupon Coupon model */ - protected $coupon = null; + protected $couponModel = null; - /** @var string Coupon type */ - protected $type; + /** @var string Coupon Service id */ + protected $serviceId; /** @var string Language code ISO (ex: fr_FR) */ protected $locale = null; @@ -90,7 +90,7 @@ class CouponCreateOrUpdateEvent extends ActionEvent * @param string $code Coupon Code * @param string $title Coupon title * @param float $amount Amount removed from the Total Checkout - * @param string $type Coupon type + * @param string $serviceId Coupon Service id * @param string $shortDescription Coupon short description * @param string $description Coupon description * @param bool $isEnabled Enable/Disable @@ -102,7 +102,7 @@ class CouponCreateOrUpdateEvent extends ActionEvent * @param string $locale Coupon Language code ISO (ex: fr_FR) */ public function __construct( - $code, $title, $amount, $type, $shortDescription, $description, $isEnabled, \DateTime $expirationDate, $isAvailableOnSpecialOffers, $isCumulative, $isRemovingPostage, $maxUsage, $locale + $code, $title, $amount, $serviceId, $shortDescription, $description, $isEnabled, \DateTime $expirationDate, $isAvailableOnSpecialOffers, $isCumulative, $isRemovingPostage, $maxUsage, $locale ) { $this->amount = $amount; @@ -116,7 +116,7 @@ class CouponCreateOrUpdateEvent extends ActionEvent $this->maxUsage = $maxUsage; $this->shortDescription = $shortDescription; $this->title = $title; - $this->type = $type; + $this->serviceId = $serviceId; $this->locale = $locale; } @@ -234,13 +234,13 @@ class CouponCreateOrUpdateEvent extends ActionEvent } /** - * Get Coupon type (effect) + * Get Coupon Service id (Type) * * @return string */ - public function getType() + public function getServiceId() { - return $this->type; + return $this->serviceId; } /** @@ -256,13 +256,13 @@ class CouponCreateOrUpdateEvent extends ActionEvent /** * Set Coupon Model * - * @param \Thelia\Model\Coupon $coupon Coupon Model + * @param Coupon $couponModel Coupon Model * * @return $this */ - public function setCoupon($coupon) + public function setCouponModel(Coupon $couponModel) { - $this->coupon = $coupon; + $this->couponModel = $couponModel; return $this; } @@ -272,13 +272,13 @@ class CouponCreateOrUpdateEvent extends ActionEvent * * @return \Thelia\Model\Coupon */ - public function getCoupon() + public function getCouponModel() { - return $this->coupon; + return $this->couponModel; } /** - * Get Rules + * Get Conditions * * @return null|ConditionCollection Array of ConditionManagerInterface */ @@ -288,15 +288,15 @@ class CouponCreateOrUpdateEvent extends ActionEvent } /** - * set Rules + * Set Conditions * - * @param ConditionCollection $rules Array of ConditionManagerInterface + * @param ConditionCollection $conditions Array of ConditionManagerInterface * * @return $this */ - public function setConditions(ConditionCollection $rules) + public function setConditions(ConditionCollection $conditions) { - $this->conditions = $rules; + $this->conditions = $conditions; return $this; } diff --git a/core/lib/Thelia/Core/Event/Lang/LangCreateEvent.php b/core/lib/Thelia/Core/Event/Lang/LangCreateEvent.php new file mode 100644 index 000000000..43279b093 --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangCreateEvent.php @@ -0,0 +1,141 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; + + +/** + * Class LangCreateEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangCreateEvent extends LangEvent +{ + protected $title; + protected $code; + protected $locale; + protected $date_format; + protected $time_format; + + /** + * @param mixed $code + * + * @return $this + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * @return mixed + */ + public function getCode() + { + return $this->code; + } + + /** + * @param mixed $date_format + * + * @return $this + */ + public function setDateFormat($date_format) + { + $this->date_format = $date_format; + + return $this; + } + + /** + * @return mixed + */ + public function getDateFormat() + { + return $this->date_format; + } + + /** + * @param mixed $locale + * + * @return $this + */ + public function setLocale($locale) + { + $this->locale = $locale; + + return $this; + } + + /** + * @return mixed + */ + public function getLocale() + { + return $this->locale; + } + + /** + * @param mixed $time_format + * + * @return $this + */ + public function setTimeFormat($time_format) + { + $this->time_format = $time_format; + + return $this; + } + + /** + * @return mixed + */ + public function getTimeFormat() + { + return $this->time_format; + } + + /** + * @param mixed $title + * + * @return $this + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * @return mixed + */ + public function getTitle() + { + return $this->title; + } + + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Lang/LangDefaultBehaviorEvent.php b/core/lib/Thelia/Core/Event/Lang/LangDefaultBehaviorEvent.php new file mode 100644 index 000000000..4c3e857e3 --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangDefaultBehaviorEvent.php @@ -0,0 +1,64 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; +use Thelia\Core\Event\ActionEvent; + + +/** + * Class LangDefaultBehaviorEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangDefaultBehaviorEvent extends ActionEvent +{ + /** + * @var int default behavior status + */ + protected $defaultBehavior; + + function __construct($defaultBehavior) + { + $this->defaultBehavior = $defaultBehavior; + } + + /** + * @param int $defaultBehavior + */ + public function setDefaultBehavior($defaultBehavior) + { + $this->defaultBehavior = $defaultBehavior; + } + + /** + * @return int + */ + public function getDefaultBehavior() + { + return $this->defaultBehavior; + } + + + + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php b/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php new file mode 100644 index 000000000..eebbe27e4 --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php @@ -0,0 +1,67 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; + + +/** + * Class LangDeleteEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangDeleteEvent extends LangEvent +{ + /** + * @var int + */ + protected $lang_id; + + /** + * @param int $lang_id + */ + function __construct($lang_id) + { + $this->lang_id = $lang_id; + } + + /** + * @param int $lang_id + * + * @return $this + */ + public function setLangId($lang_id) + { + $this->lang_id = $lang_id; + + return $this; + } + + /** + * @return int + */ + public function getLangId() + { + return $this->lang_id; + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Lang/LangEvent.php b/core/lib/Thelia/Core/Event/Lang/LangEvent.php new file mode 100644 index 000000000..f66b6428a --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangEvent.php @@ -0,0 +1,76 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; +use Thelia\Core\Event\ActionEvent; +use Thelia\Model\Lang; + + +/** + * Class LangEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangEvent extends ActionEvent +{ + /** + * @var \Thelia\Model\Lang + */ + protected $lang; + + function __construct(Lang $lang = null) + { + $this->lang = $lang; + } + + /** + * @param \Thelia\Model\Lang $lang + */ + public function setLang(Lang $lang) + { + $this->lang = $lang; + } + + /** + * @return \Thelia\Model\Lang + */ + public function getLang() + { + return $this->lang; + } + + /** + * + * check if lang object is present + * + * @return bool + */ + public function hasLang() + { + return null !== $this->lang; + } + + + + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Lang/LangToggleDefaultEvent.php b/core/lib/Thelia/Core/Event/Lang/LangToggleDefaultEvent.php new file mode 100644 index 000000000..f31972f01 --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangToggleDefaultEvent.php @@ -0,0 +1,69 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; + + +/** + * Class LangToggleDefaultEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangToggleDefaultEvent extends LangEvent +{ + /** + * @var int + */ + protected $lang_id; + + /** + * @param int $lang_id + */ + function __construct($lang_id) + { + $this->lang_id = $lang_id; + } + + /** + * @param int $lang_id + * + * @return $this + */ + public function setLangId($lang_id) + { + $this->lang_id = $lang_id; + + return $this; + } + + /** + * @return int + */ + public function getLangId() + { + return $this->lang_id; + } + + + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Lang/LangUpdateEvent.php b/core/lib/Thelia/Core/Event/Lang/LangUpdateEvent.php new file mode 100644 index 000000000..f0d4b928d --- /dev/null +++ b/core/lib/Thelia/Core/Event/Lang/LangUpdateEvent.php @@ -0,0 +1,69 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\Lang; + + +/** + * Class LangUpdateEvent + * @package Thelia\Core\Event\Lang + * @author Manuel Raynaud + */ +class LangUpdateEvent extends LangCreateEvent +{ + /** + * @var int lang id + */ + protected $id; + + /** + * @param int $id + */ + function __construct($id) + { + $this->id = $id; + } + + + /** + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * @return int + */ + public function getId() + { + return $this->id; + } + + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementCreateEvent.php similarity index 82% rename from core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php rename to core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementCreateEvent.php index 1af473aeb..721342bd8 100644 --- a/core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php +++ b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementCreateEvent.php @@ -21,21 +21,24 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event\Product; +namespace Thelia\Core\Event\ProductSaleElement; use Thelia\Model\Product; +use Thelia\Core\Event\Product\ProductEvent; -class ProductCreateCombinationEvent extends ProductEvent +class ProductSaleElementCreateEvent extends ProductSaleElementEvent { + protected $product; protected $attribute_av_list; protected $currency_id; public function __construct(Product $product, $attribute_av_list, $currency_id) { - parent::__construct($product); + parent::__construct(); - $this->attribute_av_list = $attribute_av_list; - $this->currency_id = $currency_id; + $this->setAttributeAvList($attribute_av_list); + $this->setCurrencyId($currency_id); + $this->setProduct($product); } public function getAttributeAvList() @@ -62,4 +65,15 @@ class ProductCreateCombinationEvent extends ProductEvent return $this; } + public function getProduct() { + return $this->product; + } + + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + } diff --git a/core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementDeleteEvent.php similarity index 79% rename from core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php rename to core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementDeleteEvent.php index a4e926ee6..291d59ac9 100644 --- a/core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php +++ b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementDeleteEvent.php @@ -21,19 +21,21 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event\Product; - +namespace Thelia\Core\Event\ProductSaleElement; use Thelia\Model\Product; +use Thelia\Core\Event\Product\ProductEvent; -class ProductDeleteCombinationEvent extends ProductEvent +class ProductSaleElementDeleteEvent extends ProductSaleElementEvent { protected $product_sale_element_id; + protected $currency_id; - public function __construct(Product $product, $product_sale_element_id) + public function __construct($product_sale_element_id, $currency_id) { - parent::__construct($product); + parent::__construct(); $this->product_sale_element_id = $product_sale_element_id; + $this->setCurrencyId($currency_id); } public function getProductSaleElementId() @@ -44,5 +46,19 @@ class ProductDeleteCombinationEvent extends ProductEvent public function setProductSaleElementId($product_sale_element_id) { $this->product_sale_element_id = $product_sale_element_id; + + return $this; } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + return $this; + } + } diff --git a/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementEvent.php b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementEvent.php new file mode 100644 index 000000000..a99b2cfe7 --- /dev/null +++ b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementEvent.php @@ -0,0 +1,54 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\ProductSaleElement; + +use Thelia\Model\ProductSaleElement; +use Thelia\Core\Event\ActionEvent; + +class ProductSaleElementEvent extends ActionEvent +{ + public $product_sale_element = null; + + public function __construct(ProductSaleElement $product_sale_element = null) + { + $this->product_sale_element = $product_sale_element; + } + + public function hasProductSaleElement() + { + return ! is_null($this->product_sale_element); + } + + public function getProductSaleElement() + { + return $this->product_sale_element; + } + + public function setProductSaleElement(ProductSaleElement $product_sale_element) + { + $this->product_sale_element = $product_sale_element; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementUpdateEvent.php b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementUpdateEvent.php new file mode 100644 index 000000000..a3eed8a2a --- /dev/null +++ b/core/lib/Thelia/Core/Event/ProductSaleElement/ProductSaleElementUpdateEvent.php @@ -0,0 +1,211 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event\ProductSaleElement; +use Thelia\Core\Event\Product\ProductCreateEvent; +use Thelia\Model\Product; +use Thelia\Core\Event\Product\ProductEvent; + +class ProductSaleElementUpdateEvent extends ProductSaleElementEvent +{ + protected $product_sale_element_id; + + protected $product; + protected $reference; + protected $price; + protected $currency_id; + protected $weight; + protected $quantity; + protected $sale_price; + protected $onsale; + protected $isnew; + protected $isdefault; + protected $ean_code; + protected $taxrule; + + public function __construct(Product $product, $product_sale_element_id) + { + parent::__construct(); + + $this->setProduct($product); + + $this->setProductSaleElementId($product_sale_element_id); + } + + public function getProductSaleElementId() + { + return $this->product_sale_element_id; + } + + public function setProductSaleElementId($product_sale_element_id) + { + $this->product_sale_element_id = $product_sale_element_id; + + return $this; + } + + public function getPrice() + { + return $this->price; + } + + public function setPrice($price) + { + $this->price = $price; + + return $this; + } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + + return $this; + } + + public function getWeight() + { + return $this->weight; + } + + public function setWeight($weight) + { + $this->weight = $weight; + + return $this; + } + + public function getQuantity() + { + return $this->quantity; + } + + public function setQuantity($quantity) + { + $this->quantity = $quantity; + + return $this; + } + + public function getSalePrice() + { + return $this->sale_price; + } + + public function setSalePrice($sale_price) + { + $this->sale_price = $sale_price; + + return $this; + } + + public function getOnsale() + { + return $this->onsale; + } + + public function setOnsale($onsale) + { + $this->onsale = $onsale; + + return $this; + } + + public function getIsnew() + { + return $this->isnew; + } + + public function setIsnew($isnew) + { + $this->isnew = $isnew; + + return $this; + } + + public function getEanCode() + { + return $this->ean_code; + } + + public function setEanCode($ean_code) + { + $this->ean_code = $ean_code; + + return $this; + } + + public function getIsdefault() + { + return $this->isdefault; + } + + public function setIsdefault($isdefault) + { + $this->isdefault = $isdefault; + + return $this; + } + + public function getReference() + { + return $this->reference; + } + + public function setReference($reference) + { + $this->reference = $reference; + + return $this; + } + + public function getProduct() + { + return $this->product; + } + + public function setProduct($product) + { + $this->product = $product; + + return $this; + } + + public function getTaxrule() + { + return $this->taxrule; + } + + public function setTaxrule($taxrule) + { + $this->taxrule = $taxrule; + + return $this; + } + +} diff --git a/core/lib/Thelia/Core/Event/Profile/ProfileEvent.php b/core/lib/Thelia/Core/Event/Profile/ProfileEvent.php index e4f236862..7935b00eb 100644 --- a/core/lib/Thelia/Core/Event/Profile/ProfileEvent.php +++ b/core/lib/Thelia/Core/Event/Profile/ProfileEvent.php @@ -36,6 +36,8 @@ class ProfileEvent extends ActionEvent protected $chapo = null; protected $description = null; protected $postscriptum = null; + protected $resourceAccess = null; + protected $moduleAccess = null; public function __construct(Profile $profile = null) { @@ -128,4 +130,24 @@ class ProfileEvent extends ActionEvent { return $this->title; } + + public function setResourceAccess($resourceAccess) + { + $this->resourceAccess = $resourceAccess; + } + + public function getResourceAccess() + { + return $this->resourceAccess; + } + + public function setModuleAccess($moduleAccess) + { + $this->moduleAccess = $moduleAccess; + } + + public function getModuleAccess() + { + return $this->moduleAccess; + } } diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index 0754855eb..e6e675c83 100755 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -260,14 +260,14 @@ final class TheliaEvents // -- Categories Associated Content ---------------------------------------- - const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent"; - const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent"; + const BEFORE_CREATECATEGORY_ASSOCIATED_CONTENT = "action.before_createCategoryAssociatedContent"; + const AFTER_CREATECATEGORY_ASSOCIATED_CONTENT = "action.after_createCategoryAssociatedContent"; - const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContent"; - const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteCategoryAssociatedContent"; + const BEFORE_DELETECATEGORY_ASSOCIATED_CONTENT = "action.before_deleteCategoryAssociatedContent"; + const AFTER_DELETECATEGORY_ASSOCIATED_CONTENT = "action.after_deleteCategoryAssociatedContent"; - const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent"; - const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent"; + const BEFORE_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.before_updateCategoryAssociatedContent"; + const AFTER_UPDATECATEGORY_ASSOCIATED_CONTENT = "action.after_updateCategoryAssociatedContent"; // -- Product management ----------------------------------------------- @@ -281,8 +281,9 @@ final class TheliaEvents const PRODUCT_REMOVE_CONTENT = "action.productRemoveContent"; const PRODUCT_UPDATE_CONTENT_POSITION = "action.updateProductContentPosition"; - const PRODUCT_ADD_COMBINATION = "action.productAddCombination"; - const PRODUCT_DELETE_COMBINATION = "action.productDeleteCombination"; + const PRODUCT_ADD_PRODUCT_SALE_ELEMENT = "action.addProductSaleElement"; + const PRODUCT_DELETE_PRODUCT_SALE_ELEMENT = "action.deleteProductSaleElement"; + const PRODUCT_UPDATE_PRODUCT_SALE_ELEMENT = "action.updateProductSaleElement"; const PRODUCT_SET_TEMPLATE = "action.productSetTemplate"; @@ -362,8 +363,8 @@ final class TheliaEvents * sent on modify article action */ const CART_UPDATEITEM = "action.updateArticle"; - const CART_DELETEITEM = "action.deleteArticle"; + const CART_CLEAR = "action.clear"; /** * Order linked event @@ -554,9 +555,17 @@ final class TheliaEvents // -- Profile management --------------------------------------------- - const PROFILE_CREATE = "action.createProfile"; - const PROFILE_UPDATE = "action.updateProfile"; - const PROFILE_DELETE = "action.deleteProfile"; + const PROFILE_CREATE = "action.createProfile"; + const PROFILE_UPDATE = "action.updateProfile"; + const PROFILE_DELETE = "action.deleteProfile"; + const PROFILE_RESOURCE_ACCESS_UPDATE = "action.updateProfileResourceAccess"; + const PROFILE_MODULE_ACCESS_UPDATE = "action.updateProfileModuleAccess"; + + // -- Administrator management --------------------------------------------- + + const ADMINISTRATOR_CREATE = "action.createAdministrator"; + const ADMINISTRATOR_UPDATE = "action.updateAdministrator"; + const ADMINISTRATOR_DELETE = "action.deleteAdministrator"; // -- Tax Rules management --------------------------------------------- @@ -693,4 +702,24 @@ final class TheliaEvents const NEWSLETTER_SUBSCRIBE = 'thelia.newsletter.subscribe'; const NEWSLETTER_UPDATE = 'thelia.newsletter.update'; const NEWSLETTER_UNSUBSCRIBE = 'thelia.newsletter.unsubscribe'; + + /************ LANG MANAGEMENT ****************************/ + + const LANG_UPDATE = 'action.lang.update'; + const LANG_CREATE = 'action.lang.create'; + const LANG_DELETE = 'action.lang.delete'; + + const LANG_DEFAULTBEHAVIOR = 'action.lang.defaultBehavior'; + const LANG_URL = 'action.lang.url'; + + const LANG_TOGGLEDEFAULT = 'action.lang.toggleDefault'; + + const BEFORE_UPDATELANG = 'action.lang.beforeUpdate'; + const AFTER_UPDATELANG = 'action.lang.afterUpdate'; + + const BEFORE_CREATELANG = 'action.lang.beforeCreate'; + const AFTER_CREATELANG = 'action.lang.afterCreate'; + + const BEFORE_DELETELANG = 'action.lang.beforeDelete'; + const AFTER_DELETELANG = 'action.lang.afterDelete'; } diff --git a/core/lib/Thelia/Core/HttpFoundation/Session/Session.php b/core/lib/Thelia/Core/HttpFoundation/Session/Session.php index 09b932a98..b35bd4a13 100755 --- a/core/lib/Thelia/Core/HttpFoundation/Session/Session.php +++ b/core/lib/Thelia/Core/HttpFoundation/Session/Session.php @@ -70,6 +70,13 @@ class Session extends BaseSession $this->set("thelia.current.currency", $currency); } + /** + * Return current currency + * + * @param bool $forceDefault If default currency forced + * + * @return Currency + */ public function getCurrency($forceDefault = true) { $currency = $this->get("thelia.current.currency"); diff --git a/core/lib/Thelia/Core/Security/AccessManager.php b/core/lib/Thelia/Core/Security/AccessManager.php index cdf7105a8..8db6c206f 100644 --- a/core/lib/Thelia/Core/Security/AccessManager.php +++ b/core/lib/Thelia/Core/Security/AccessManager.php @@ -49,7 +49,7 @@ class AccessManager self::DELETE => false, ); - protected $accessPows = array( + static protected $accessPows = array( self::VIEW => 3, self::CREATE => 2, self::UPDATE => 1, @@ -62,14 +62,7 @@ class AccessManager { $this->accessValue = $accessValue; - foreach($this->accessPows as $type => $value) { - if($accessValue >= $value) { - $accessValue -= $value; - $this->accessGranted[$type] = true; - } else { - $this->accessGranted[$type] = false; - } - } + $this->fillGrantedAccess(); } public function can($type) @@ -81,4 +74,41 @@ class AccessManager return $this->accessGranted[$type]; } + + static public function getMaxAccessValue() + { + return pow(2, current(array_slice( self::$accessPows, -1, 1, true ))) - 1; + } + + public function build($accesses) + { + $this->accessValue = 0; + foreach($accesses as $access) { + if(array_key_exists($access, self::$accessPows)) { + $this->accessValue += pow(2, self::$accessPows[$access]); + } + } + + $this->fillGrantedAccess(); + } + + protected function fillGrantedAccess() + { + $accessValue = $this->accessValue; + foreach(self::$accessPows as $type => $value) { + $pow = pow(2, $value); + if($accessValue >= $pow) { + $accessValue -= $pow; + $this->accessGranted[$type] = true; + } else { + $this->accessGranted[$type] = false; + } + } + } + + + public function getAccessValue() + { + return $this->accessValue; + } } diff --git a/core/lib/Thelia/Core/Security/Resource/AdminResources.php b/core/lib/Thelia/Core/Security/Resource/AdminResources.php index 8ca3bdd82..d935c64ab 100644 --- a/core/lib/Thelia/Core/Security/Resource/AdminResources.php +++ b/core/lib/Thelia/Core/Security/Resource/AdminResources.php @@ -37,16 +37,16 @@ final class AdminResources static public function retrieve($name) { - $contantName = strtoupper($name); + $constantName = strtoupper($name); if(null === self::$selfReflection) { self::$selfReflection = new \ReflectionClass(__CLASS__); } - if(self::$selfReflection->hasConstant($contantName)) { - return self::$selfReflection->getConstant($contantName); + if(self::$selfReflection->hasConstant($constantName)) { + return self::$selfReflection->getConstant($constantName); } else { - throw new ResourceException(sprintf('Resource `%s` not found', $contantName), ResourceException::RESOURCE_NOT_FOUND); + throw new ResourceException(sprintf('Resource `%s` not found', $constantName), ResourceException::RESOURCE_NOT_FOUND); } } @@ -54,7 +54,7 @@ final class AdminResources const ADDRESS = "admin.address"; - const ADMIN = "admin.configuration.admin"; + const ADMINISTRATOR = "admin.configuration.administrator"; const AREA = "admin.configuration.area"; diff --git a/core/lib/Thelia/Core/Template/Loop/Admin.php b/core/lib/Thelia/Core/Template/Loop/Admin.php index fe4b280ad..378bcaf31 100755 --- a/core/lib/Thelia/Core/Template/Loop/Admin.php +++ b/core/lib/Thelia/Core/Template/Loop/Admin.php @@ -25,6 +25,7 @@ namespace Thelia\Core\Template\Loop; use Propel\Runtime\ActiveQuery\Criteria; use Thelia\Core\Template\Element\BaseI18nLoop; +use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -44,7 +45,7 @@ use Thelia\Type\BooleanOrBothType; * @package Thelia\Core\Template\Loop * @author Etienne Roudeix */ -class Admin extends BaseI18nLoop +class Admin extends BaseLoop { public $timestampable = true; @@ -83,17 +84,17 @@ class Admin extends BaseI18nLoop $search->orderByFirstname(Criteria::ASC); /* perform search */ - $features = $this->search($search, $pagination); + $admins = $this->search($search, $pagination); - $loopResult = new LoopResult($features); + $loopResult = new LoopResult($admins); - foreach ($features as $feature) { - $loopResultRow = new LoopResultRow($loopResult, $feature, $this->versionable, $this->timestampable, $this->countable); - $loopResultRow->set("ID", $feature->getId()) - ->set("PROFILE",$feature->getProfileId()) - ->set("FIRSTNAME",$feature->getFirstname()) - ->set("LASTNAME",$feature->getLastname()) - ->set("LOGIN",$feature->getLogin()) + foreach ($admins as $admin) { + $loopResultRow = new LoopResultRow($loopResult, $admin, $this->versionable, $this->timestampable, $this->countable); + $loopResultRow->set("ID", $admin->getId()) + ->set("PROFILE",$admin->getProfileId()) + ->set("FIRSTNAME",$admin->getFirstname()) + ->set("LASTNAME",$admin->getLastname()) + ->set("LOGIN",$admin->getLogin()) ; $loopResult->addRow($loopResultRow); diff --git a/core/lib/Thelia/Core/Template/Loop/Auth.php b/core/lib/Thelia/Core/Template/Loop/Auth.php index f5691cbd6..cdb668978 100755 --- a/core/lib/Thelia/Core/Template/Loop/Auth.php +++ b/core/lib/Thelia/Core/Template/Loop/Auth.php @@ -23,6 +23,7 @@ namespace Thelia\Core\Template\Loop; +use Thelia\Core\Security\AccessManager; use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -45,7 +46,7 @@ class Auth extends BaseLoop { return new ArgumentCollection( new Argument( - 'roles', + 'role', new TypeCollection( new AlphaNumStringListType() ), @@ -61,7 +62,7 @@ class Auth extends BaseLoop new Argument( 'access', new TypeCollection( - new EnumListType(array("view", "create", "update", "delete")) + new EnumListType(array(AccessManager::VIEW, AccessManager::CREATE, AccessManager::UPDATE, AccessManager::DELETE)) ) ), Argument::createAnyTypeArgument('context', 'front', false) @@ -75,7 +76,7 @@ class Auth extends BaseLoop */ public function exec(&$pagination) { - $roles = $this->getRoles(); + $roles = $this->getRole(); $resource = $this->getResource(); $access = $this->getAccess(); diff --git a/core/lib/Thelia/Core/Template/Loop/Country.php b/core/lib/Thelia/Core/Template/Loop/Country.php index a44e49277..87e45cb47 100755 --- a/core/lib/Thelia/Core/Template/Loop/Country.php +++ b/core/lib/Thelia/Core/Template/Loop/Country.php @@ -113,13 +113,13 @@ class Country extends BaseI18nLoop ->set("CHAPO", $country->getVirtualColumn('i18n_CHAPO')) ->set("DESCRIPTION", $country->getVirtualColumn('i18n_DESCRIPTION')) ->set("POSTSCRIPTUM", $country->getVirtualColumn('i18n_POSTSCRIPTUM')) - ->set("IS_DEFAULT", $country->getByDefault() === 1 ? "1" : "0") ->set("ISOCODE", $country->getIsocode()) ->set("ISOALPHA2", $country->getIsoalpha2()) ->set("ISOALPHA3", $country->getIsoalpha3()) - ->set('IS_DEFAULT', $country->getByDefault()) + ->set("IS_DEFAULT", $country->getByDefault() ? "1" : "0") + ->set("IS_SHOP_COUNTRY", $country->getShopCountry() ? "1" : "0") + ; - ; $loopResult->addRow($loopResultRow); } diff --git a/core/lib/Thelia/Core/Template/Loop/Lang.php b/core/lib/Thelia/Core/Template/Loop/Lang.php index 487acb565..52a866d30 100755 --- a/core/lib/Thelia/Core/Template/Loop/Lang.php +++ b/core/lib/Thelia/Core/Template/Loop/Lang.php @@ -99,7 +99,8 @@ class Lang extends BaseLoop ->set("LOCALE", $result->getLocale()) ->set("URL", $result->getUrl()) ->set("IS_DEFAULT", $result->getByDefault()) - ->set("URL", $result->getUrl()) + ->set("DATE_FORMAT", $result->getDateFormat()) + ->set("TIME_FORMAT", $result->getTimeFormat()) ->set("POSITION", $result->getPosition()) ; diff --git a/core/lib/Thelia/Core/Template/Loop/Module.php b/core/lib/Thelia/Core/Template/Loop/Module.php index d780658c0..3c046f61d 100755 --- a/core/lib/Thelia/Core/Template/Loop/Module.php +++ b/core/lib/Thelia/Core/Template/Loop/Module.php @@ -24,6 +24,7 @@ namespace Thelia\Core\Template\Loop; use Propel\Runtime\ActiveQuery\Criteria; +use Thelia\Core\Security\AccessManager; use Thelia\Core\Template\Element\BaseI18nLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -56,6 +57,13 @@ class Module extends BaseI18nLoop { return new ArgumentCollection( Argument::createIntListTypeArgument('id'), + Argument::createIntTypeArgument('profile'), + new Argument( + 'code', + new Type\TypeCollection( + new Type\AlphaNumStringListType() + ) + ), new Argument( 'module_type', new Type\TypeCollection( @@ -89,6 +97,20 @@ class Module extends BaseI18nLoop $search->filterById($id, Criteria::IN); } + $profile = $this->getProfile(); + + if (null !== $profile) { + $search->leftJoinProfileModule('profile_module') + ->addJoinCondition('profile_module', 'profile_module.PROFILE_ID=?', $profile, null, \PDO::PARAM_INT) + ->withColumn('profile_module.access', 'access'); + } + + $code = $this->getCode(); + + if(null !== $code) { + $search->filterByCode($code, Criteria::IN); + } + $moduleType = $this->getModule_type(); if (null !== $moduleType) { @@ -129,6 +151,16 @@ class Module extends BaseI18nLoop ->set("CLASS", $module->getFullNamespace()) ->set("POSITION", $module->getPosition()); + if (null !== $profile) { + $accessValue = $module->getVirtualColumn('access'); + $manager = new AccessManager($accessValue); + + $loopResultRow->set("VIEWABLE", $manager->can(AccessManager::VIEW)? 1 : 0) + ->set("CREATABLE", $manager->can(AccessManager::CREATE) ? 1 : 0) + ->set("UPDATABLE", $manager->can(AccessManager::UPDATE)? 1 : 0) + ->set("DELETABLE", $manager->can(AccessManager::DELETE)? 1 : 0); + } + $loopResult->addRow($loopResultRow); } diff --git a/core/lib/Thelia/Core/Template/Loop/OrderProduct.php b/core/lib/Thelia/Core/Template/Loop/OrderProduct.php index ab1fa2ab1..f12bbed70 100755 --- a/core/lib/Thelia/Core/Template/Loop/OrderProduct.php +++ b/core/lib/Thelia/Core/Template/Loop/OrderProduct.php @@ -108,6 +108,7 @@ class OrderProduct extends BaseLoop ->set("TAX_RULE_TITLE", $product->getTaxRuleTitle()) ->set("TAX_RULE_DESCRIPTION", $product->getTaxRuledescription()) ->set("PARENT", $product->getParent()) + ->set("EAN_CODE", $product->getEanCode()) ; $loopResult->addRow($loopResultRow); diff --git a/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php b/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php index aa71d2b3c..29d56b149 100755 --- a/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php +++ b/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php @@ -177,6 +177,7 @@ class ProductSaleElements extends BaseLoop ->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0) ->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0) ->set("WEIGHT" , $PSEValue->getWeight()) + ->set("EAN_CODE" , $PSEValue->getEanCode()) ->set("PRICE" , $price) ->set("PRICE_TAX" , $taxedPrice - $price) ->set("TAXED_PRICE" , $taxedPrice) diff --git a/core/lib/Thelia/Core/Template/Loop/Profile.php b/core/lib/Thelia/Core/Template/Loop/Profile.php index a7a2e170e..4ac43d25a 100755 --- a/core/lib/Thelia/Core/Template/Loop/Profile.php +++ b/core/lib/Thelia/Core/Template/Loop/Profile.php @@ -79,20 +79,20 @@ class Profile extends BaseI18nLoop $search->orderById(Criteria::ASC); /* perform search */ - $features = $this->search($search, $pagination); + $profiles = $this->search($search, $pagination); - $loopResult = new LoopResult($features); + $loopResult = new LoopResult($profiles); - foreach ($features as $feature) { - $loopResultRow = new LoopResultRow($loopResult, $feature, $this->versionable, $this->timestampable, $this->countable); - $loopResultRow->set("ID", $feature->getId()) - ->set("IS_TRANSLATED",$feature->getVirtualColumn('IS_TRANSLATED')) + foreach ($profiles as $profile) { + $loopResultRow = new LoopResultRow($loopResult, $profile, $this->versionable, $this->timestampable, $this->countable); + $loopResultRow->set("ID", $profile->getId()) + ->set("IS_TRANSLATED",$profile->getVirtualColumn('IS_TRANSLATED')) ->set("LOCALE",$locale) - ->set("CODE",$feature->getCode()) - ->set("TITLE",$feature->getVirtualColumn('i18n_TITLE')) - ->set("CHAPO", $feature->getVirtualColumn('i18n_CHAPO')) - ->set("DESCRIPTION", $feature->getVirtualColumn('i18n_DESCRIPTION')) - ->set("POSTSCRIPTUM", $feature->getVirtualColumn('i18n_POSTSCRIPTUM')) + ->set("CODE",$profile->getCode()) + ->set("TITLE",$profile->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO", $profile->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION", $profile->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM", $profile->getVirtualColumn('i18n_POSTSCRIPTUM')) ; $loopResult->addRow($loopResultRow); diff --git a/core/lib/Thelia/Core/Template/Loop/Resource.php b/core/lib/Thelia/Core/Template/Loop/Resource.php new file mode 100755 index 000000000..2b2d90f70 --- /dev/null +++ b/core/lib/Thelia/Core/Template/Loop/Resource.php @@ -0,0 +1,128 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Template\Loop; + +use Propel\Runtime\ActiveQuery\Criteria; +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Template\Element\BaseI18nLoop; +use Thelia\Core\Template\Element\LoopResult; +use Thelia\Core\Template\Element\LoopResultRow; + +use Thelia\Core\Template\Loop\Argument\ArgumentCollection; +use Thelia\Core\Template\Loop\Argument\Argument; + +use Thelia\Model\ResourceQuery; +use Thelia\Type; +use Thelia\Type\BooleanOrBothType; + +/** + * + * Resource loop + * + * + * Class Resource + * @package Thelia\Core\Template\Loop + * @author Etienne Roudeix + */ +class Resource extends BaseI18nLoop +{ + public $timestampable = true; + + /** + * @return ArgumentCollection + */ + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntTypeArgument('profile'), + new Argument( + 'code', + new Type\TypeCollection( + new Type\AlphaNumStringListType() + ) + ) + ); + } + + /** + * @param $pagination + * + * @return \Thelia\Core\Template\Element\LoopResult + */ + public function exec(&$pagination) + { + $search = ResourceQuery::create(); + + /* manage translations */ + $locale = $this->configureI18nProcessing($search); + + $profile = $this->getProfile(); + + if (null !== $profile) { + $search->leftJoinProfileResource('profile_resource') + ->addJoinCondition('profile_resource', 'profile_resource.PROFILE_ID=?', $profile, null, \PDO::PARAM_INT) + ->withColumn('profile_resource.access', 'access'); + } + + $code = $this->getCode(); + + if(null !== $code) { + $search->filterByCode($code, Criteria::IN); + } + + $search->orderById(Criteria::ASC); + + /* perform search */ + $resources = $this->search($search, $pagination); + + $loopResult = new LoopResult($resources); + + foreach ($resources as $resource) { + $loopResultRow = new LoopResultRow($loopResult, $resource, $this->versionable, $this->timestampable, $this->countable); + $loopResultRow->set("ID", $resource->getId()) + ->set("IS_TRANSLATED",$resource->getVirtualColumn('IS_TRANSLATED')) + ->set("LOCALE",$locale) + ->set("CODE",$resource->getCode()) + ->set("TITLE",$resource->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO", $resource->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION", $resource->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM", $resource->getVirtualColumn('i18n_POSTSCRIPTUM')) + ; + + if (null !== $profile) { + $accessValue = $resource->getVirtualColumn('access'); + $manager = new AccessManager($accessValue); + + $loopResultRow->set("VIEWABLE", $manager->can(AccessManager::VIEW)? 1 : 0) + ->set("CREATABLE", $manager->can(AccessManager::CREATE) ? 1 : 0) + ->set("UPDATABLE", $manager->can(AccessManager::UPDATE)? 1 : 0) + ->set("DELETABLE", $manager->can(AccessManager::DELETE)? 1 : 0); + } + + $loopResult->addRow($loopResultRow); + } + + return $loopResult; + } +} diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php index 3727ed6c5..8539796b0 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php @@ -22,9 +22,6 @@ /*************************************************************************************/ namespace Thelia\Core\Template\Smarty\Plugins; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\CollectionType; -use Symfony\Component\Form\Extension\Core\View\ChoiceView; use Symfony\Component\Form\FormView; use Thelia\Core\Form\Type\TheliaType; use Thelia\Form\BaseForm; @@ -33,6 +30,9 @@ use Symfony\Component\HttpFoundation\Request; use Thelia\Core\Template\Smarty\SmartyPluginDescriptor; use Thelia\Core\Template\Smarty\AbstractSmartyPlugin; use Thelia\Core\Template\ParserContext; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\CollectionType; +use Symfony\Component\Form\Extension\Core\View\ChoiceView; /** * @@ -78,8 +78,8 @@ class Form extends AbstractSmartyPlugin { foreach ($formDefinition as $name => $className) { if (array_key_exists($name, $this->formDefinition)) { - throw new \InvalidArgumentException(sprintf("%s form name already exists for %s class", $name, - $className)); + throw new \InvalidArgumentException( + sprintf("%s form name already exists for %s class", $name, $className)); } $this->formDefinition[$name] = $className; @@ -113,7 +113,8 @@ class Form extends AbstractSmartyPlugin $template->assign("form_error", $instance->hasError() ? true : false); $template->assign("form_error_message", $instance->getErrorMessage()); - } else { + } + else { return $content; } } @@ -139,7 +140,7 @@ class Form extends AbstractSmartyPlugin $template->assign("error", empty($errors) ? false : true); - if (! empty($errors)) { + if (!empty($errors)) { $this->assignFieldErrorVars($template, $errors); } @@ -205,30 +206,37 @@ class Form extends AbstractSmartyPlugin $this->assignFormTypeValues($template, $formFieldConfig, $formFieldView); $value = $formFieldView->vars["value"]; -/* FIXME: doesnt work. We got "This form should not contain extra fields." error. -// We have a collection -if (is_array($value)) { -$key = $this->getParam($params, 'value_key'); + // We have a collection + if (count($formFieldView->children) > 0) { -if ($key != null) { + $key = $this->getParam($params, 'value_key'); -if (isset($value[$key])) { + if ($key != null) { -$name = sprintf("%s[%s]", $formFieldView->vars["full_name"], $key); -$val = $value[$key]; + if (isset($value[$key])) { -$this->assignFieldValues($template, $name, $val, $formFieldView->vars); -} -} -} else { -$this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVars["value"], $formFieldView->vars); -} -*/ - $this->assignFieldValues($template, $formFieldView->vars["full_name"], $formFieldView->vars["value"], $formFieldView->vars); + $name = sprintf("%s[%s]", $formFieldView->vars["full_name"], $key); + + $val = $value[$key]; + + $this->assignFieldValues($template, $name, $val, $formFieldView->vars); + } + else { + throw new \LogicException(sprintf("Cannot find a value for key '%s' in field '%s'", $key, $formFieldView->vars["name"])); + } + } + else { + throw new \InvalidArgumentException(sprintf("Missing or empty parameter 'value_key' for field '%s'", $formFieldView->vars["name"])); + } + } + else { + $this->assignFieldValues($template, $formFieldView->vars["full_name"], $formFieldView->vars["value"], $formFieldView->vars); + } $formFieldView->setRendered(); - } else { + } + else { return $content; } } @@ -262,7 +270,9 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar self::$taggedFieldsStackPosition = null; } - return $content; + if(null !== $content) { + return $content; + } } public function renderHiddenFormField($params, \Smarty_Internal_Template $template) @@ -298,7 +308,7 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar $formView = $instance->getView(); if ($formView->vars["multipart"]) { - return sprintf('%s="%s"',"enctype", "multipart/form-data"); + return sprintf('%s="%s"', "enctype", "multipart/form-data"); } } @@ -314,7 +324,8 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar if ($repeat) { $this->assignFieldErrorVars($template, $errors); - } else { + } + else { return $content; } } @@ -337,11 +348,10 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar $fieldName = $this->getParam($params, 'field'); - if (null == $fieldName) - throw new \InvalidArgumentException("'field' parameter is missing"); + if (null == $fieldName) throw new \InvalidArgumentException("'field' parameter is missing"); - if (empty($instance->getView()[$fieldName])) - throw new \InvalidArgumentException(sprintf("Field name '%s' not found in form %s", $fieldName, $instance->getName())); + if (empty($instance->getView()[$fieldName])) throw new \InvalidArgumentException( + sprintf("Field name '%s' not found in form %s", $fieldName, $instance->getName())); return $instance->getView()[$fieldName]; } @@ -396,8 +406,10 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar throw new \InvalidArgumentException("Missing 'form' parameter in form arguments"); } - if (! $instance instanceof \Thelia\Form\BaseForm) { - throw new \InvalidArgumentException(sprintf("form parameter in form_field block must be an instance of + if (!$instance instanceof \Thelia\Form\BaseForm) { + throw new \InvalidArgumentException( + sprintf( + "form parameter in form_field block must be an instance of \Thelia\Form\BaseForm, instance of %s found", get_class($instance))); } @@ -412,10 +424,7 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar $class = new \ReflectionClass($this->formDefinition[$name]); - return $class->newInstance( - $this->request, - "form" - ); + return $class->newInstance($this->request, "form"); } /** diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index 536eb2a4e..01491e6fd 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -28,6 +28,7 @@ use Thelia\Core\Template\Smarty\AbstractSmartyPlugin; use Thelia\Core\Template\Smarty\Exception\SmartyPluginException; use Thelia\Core\Template\Smarty\SmartyPluginDescriptor; use Thelia\Tools\DateTimeFormat; +use Thelia\Tools\NumberFormat; /** * @@ -69,21 +70,20 @@ class Format extends AbstractSmartyPlugin */ public function formatDate($params, $template = null) { + $date = $this->getParam($params, "date", false); - if (array_key_exists("date", $params) === false) { + if ($date === false) { throw new SmartyPluginException("date is a mandatory parameter in format_date function"); } - $date = $params["date"]; - if (!$date instanceof \DateTime) { return ""; } - if (array_key_exists("format", $params)) { - $format = $params["format"]; - } else { - $format = DateTimeFormat::getInstance($this->request)->getFormat(array_key_exists("output", $params) ? $params["output"] : null); + $format = $this->getParam($params, "format", false); + + if ($format === false) { + $format = DateTimeFormat::getInstance($this->request)->getFormat($this->getParam($params, "output", null)); } return $date->format($format); @@ -109,23 +109,22 @@ class Format extends AbstractSmartyPlugin */ public function formatNumber($params, $template = null) { - if (array_key_exists("number", $params) === false) { + $number = $this->getParam($params, "number", false); + + if ($number === false) { throw new SmartyPluginException("number is a mandatory parameter in format_number function"); } - $number = $params["number"]; - - if (empty($number)) { + if ($number == '') { return ""; } - $lang = $this->request->getSession()->getLang(); - - $decimals = array_key_exists("decimals", $params) ? $params["decimals"] : $lang->getDecimals(); - $decPoint = array_key_exists("dec_point", $params) ? $params["dec_point"] : $lang->getDecimalSeparator(); - $thousandsSep = array_key_exists("thousands_sep", $params) ? $params["thousands_sep"] : $lang->getThousandsSeparator(); - - return number_format($number, $decimals, $decPoint, $thousandsSep); + return NumberFormat::getInstance($this->request)->format( + $number, + $this->getParam($params, "decimals", null), + $this->getParam($params, "dec_point", null), + $this->getParam($params, "thousands_sep", null) + ); } /** diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php index 199a0bb0b..690e2cd81 100755 --- a/core/lib/Thelia/Core/Thelia.php +++ b/core/lib/Thelia/Core/Thelia.php @@ -96,7 +96,10 @@ class Thelia extends Kernel { parent::boot(); - $this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT); + if (file_exists(THELIA_ROOT . '/local/config/database.yml') === true) { + $this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT); + } + } /** diff --git a/core/lib/Thelia/Coupon/BaseAdapter.php b/core/lib/Thelia/Coupon/BaseFacade.php similarity index 78% rename from core/lib/Thelia/Coupon/BaseAdapter.php rename to core/lib/Thelia/Coupon/BaseFacade.php index 883758ce1..9d28be69f 100644 --- a/core/lib/Thelia/Coupon/BaseAdapter.php +++ b/core/lib/Thelia/Coupon/BaseFacade.php @@ -27,8 +27,8 @@ use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\TranslatorInterface; +use Thelia\Condition\ConditionEvaluator; use Thelia\Core\HttpFoundation\Request; -use Thelia\Coupon\Type\CouponInterface; use Thelia\Model\Coupon; use Thelia\Model\CouponQuery; use Thelia\Cart\CartTrait; @@ -44,10 +44,9 @@ use Thelia\Model\CurrencyQuery; * * @package Coupon * @author Guillaume MOREL - * @todo implements * */ -class BaseAdapter implements AdapterInterface +class BaseFacade implements FacadeInterface { use CartTrait { CartTrait::getCart as getCartFromTrait; @@ -86,7 +85,7 @@ class BaseAdapter implements AdapterInterface */ public function getDeliveryAddress() { - // TODO: Implement getDeliveryAddress() method. + // @todo: Implement getDeliveryAddress() method. } /** @@ -106,7 +105,7 @@ class BaseAdapter implements AdapterInterface */ public function getCheckoutTotalPrice() { - // TODO: Implement getCheckoutTotalPrice() method. + return $this->getRequest()->getSession()->getOrder()->getTotalAmount(); } /** @@ -116,7 +115,7 @@ class BaseAdapter implements AdapterInterface */ public function getCheckoutPostagePrice() { - // TODO: Implement getCheckoutPostagePrice() method. + return $this->getRequest()->getSession()->getOrder()->getPostage(); } /** @@ -126,7 +125,8 @@ class BaseAdapter implements AdapterInterface */ public function getCartTotalPrice() { - // TODO: Implement getCartTotalPrice() method. + return $this->getRequest()->getSession()->getCart()->getTotalAmount(); + } /** @@ -136,7 +136,7 @@ class BaseAdapter implements AdapterInterface */ public function getCheckoutCurrency() { - $this->getRequest()->getSession()->getCurrency(); + return $this->getRequest()->getSession()->getCurrency()->getCode(); } @@ -147,7 +147,7 @@ class BaseAdapter implements AdapterInterface */ public function getNbArticlesInCart() { - // TODO: Implement getNbArticlesInCart() method. + return count($this->getRequest()->getSession()->getCart()->getCartItems()); } /** @@ -157,16 +157,13 @@ class BaseAdapter implements AdapterInterface */ public function getCurrentCoupons() { - // @todo implement -// $consumedCoupons = $this->getRequest()->getSession()->getConsumedCoupons(); - // @todo convert coupon code to coupon Interface - + $couponCodes = $this->getRequest()->getSession()->getConsumedCoupons(); + if (null === $couponCodes) { + return array(); + } $couponFactory = $this->container->get('thelia.coupon.factory'); - // @todo get from cart - $couponCodes = array('XMAS', 'SPRINGBREAK'); - $coupons = array(); foreach ($couponCodes as $couponCode) { $coupons[] = $couponFactory->buildCouponFromCode($couponCode); @@ -190,34 +187,7 @@ class BaseAdapter implements AdapterInterface } /** - * Save a Coupon in the database - * - * @param CouponInterface $coupon Coupon - * - * @return $this - */ - public function saveCoupon(CouponInterface $coupon) - { -// $couponModel = new Coupon(); -// $couponModel->setCode($coupon->getCode()); -// $couponModel->setType(get_class($coupon)); -// $couponModel->setTitle($coupon->getTitle()); -// $couponModel->setShortDescription($coupon->getShortDescription()); -// $couponModel->setDescription($coupon->getDescription()); -// $couponModel->setAmount($coupon->getDiscount()); -// $couponModel->setIsUsed(0); -// $couponModel->setIsEnabled(1); -// $couponModel->set -// $couponModel->set -// $couponModel->set -// $couponModel->set -// $couponModel->set -// $couponModel->set -// $couponModel->set - } - - /** - * Return plateform Container + * Return platform Container * * @return Container */ @@ -245,7 +215,7 @@ class BaseAdapter implements AdapterInterface */ public function getMainCurrency() { - // TODO: Implement getMainCurrency() method. + return $this->getRequest()->getSession()->getCurrency(); } /** @@ -261,7 +231,7 @@ class BaseAdapter implements AdapterInterface /** * Return Constraint Validator * - * @return ConditionValidator + * @return ConditionEvaluator */ public function getConditionEvaluator() { diff --git a/core/lib/Thelia/Coupon/ConditionCollection.php b/core/lib/Thelia/Coupon/ConditionCollection.php index 21e694aef..f9513160b 100644 --- a/core/lib/Thelia/Coupon/ConditionCollection.php +++ b/core/lib/Thelia/Coupon/ConditionCollection.php @@ -25,8 +25,6 @@ namespace Thelia\Coupon; use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Condition\ConditionManagerInterface; -use Thelia\Constraint\Rule\CouponRuleInterface; -use Thelia\Constraint\Rule\SerializableRule; /** * Created by JetBrains PhpStorm. diff --git a/core/lib/Thelia/Coupon/CouponFactory.php b/core/lib/Thelia/Coupon/CouponFactory.php index 102d1a74c..603fcaa77 100644 --- a/core/lib/Thelia/Coupon/CouponFactory.php +++ b/core/lib/Thelia/Coupon/CouponFactory.php @@ -47,7 +47,7 @@ class CouponFactory /** @var ContainerInterface Service Container */ protected $container = null; - /** @var AdapterInterface Provide necessary value from Thelia*/ + /** @var FacadeInterface Provide necessary value from Thelia*/ protected $adapter; /** diff --git a/core/lib/Thelia/Coupon/CouponManager.php b/core/lib/Thelia/Coupon/CouponManager.php index c4ba661be..1b446f1e0 100644 --- a/core/lib/Thelia/Coupon/CouponManager.php +++ b/core/lib/Thelia/Coupon/CouponManager.php @@ -26,6 +26,7 @@ namespace Thelia\Coupon; use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Condition\ConditionManagerInterface; use Thelia\Coupon\Type\CouponInterface; +use Thelia\Model\Coupon; /** * Created by JetBrains PhpStorm. @@ -40,7 +41,7 @@ use Thelia\Coupon\Type\CouponInterface; */ class CouponManager { - /** @var AdapterInterface Provides necessary value from Thelia */ + /** @var FacadeInterface Provides necessary value from Thelia */ protected $adapter = null; /** @var ContainerInterface Service Container */ @@ -183,39 +184,12 @@ class CouponManager $discount = 0.00; /** @var CouponInterface $coupon */ foreach ($coupons as $coupon) { - // @todo modify Cart with discount for each cart item - $discount += $coupon->getDiscount($this->adapter); + $discount += $coupon->exec($this->adapter); } return $discount; } - /** - * Build a ConditionManagerInterface from data coming from a form - * - * @param string $conditionServiceId Condition service id you want to instantiate - * @param array $operators Condition Operator set by the Admin - * @param array $values Condition Values set by the Admin - * - * @return ConditionManagerInterface - */ - public function buildRuleFromForm($conditionServiceId, array $operators, array $values) - { - $condition = false; - try { - - if ($this->container->has($conditionServiceId)) { - /** @var ConditionManagerInterface $condition */ - $condition = $this->container->get($conditionServiceId); - $condition->populateFromForm($operators, $values); - } - } catch (\InvalidArgumentException $e) { - - } - - return $condition; - } - /** * Add an available CouponManager (Services) * @@ -241,7 +215,7 @@ class CouponManager * * @param ConditionManagerInterface $condition ConditionManagerInterface */ - public function addAvailableRule(ConditionManagerInterface $condition) + public function addAvailableCondition(ConditionManagerInterface $condition) { $this->availableConditions[] = $condition; } @@ -255,4 +229,34 @@ class CouponManager { return $this->availableConditions; } + + /** + * Decrement this coupon quantity + * + * To call when a coupon is consumed + * + * @param \Thelia\Model\Coupon $coupon Coupon consumed + * + * @return bool + */ + public function decrementeQuantity(Coupon $coupon) + { + $ret = true; + try { + + $oldMaxUsage = $coupon->getMaxUsage(); + + if ($oldMaxUsage > 0) { + $oldMaxUsage--; + $coupon->setMaxUsage($$oldMaxUsage); + + $coupon->save(); + } + + } catch(\Exception $e) { + $ret = false; + } + + return $ret; + } } \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/AdapterInterface.php b/core/lib/Thelia/Coupon/FacadeInterface.php similarity index 94% rename from core/lib/Thelia/Coupon/AdapterInterface.php rename to core/lib/Thelia/Coupon/FacadeInterface.php index 37979b44f..4c264430c 100644 --- a/core/lib/Thelia/Coupon/AdapterInterface.php +++ b/core/lib/Thelia/Coupon/FacadeInterface.php @@ -25,11 +25,9 @@ namespace Thelia\Coupon; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\TranslatorInterface; use Thelia\Condition\ConditionEvaluator; use Thelia\Core\HttpFoundation\Request; -use Thelia\Coupon\Type\CouponInterface; use Thelia\Model\Coupon; /** @@ -43,7 +41,7 @@ use Thelia\Model\Coupon; * @author Guillaume MOREL * */ -interface AdapterInterface +interface FacadeInterface { /** @@ -126,15 +124,6 @@ interface AdapterInterface */ public function findOneCouponByCode($code); - /** - * Save a Coupon in the database - * - * @param CouponInterface $coupon Coupon - * - * @return $this - */ - public function saveCoupon(CouponInterface $coupon); - /** * Return platform Container * diff --git a/core/lib/Thelia/Coupon/RuleOrganizer.php b/core/lib/Thelia/Coupon/RuleOrganizer.php index ee840bfbc..673f27404 100644 --- a/core/lib/Thelia/Coupon/RuleOrganizer.php +++ b/core/lib/Thelia/Coupon/RuleOrganizer.php @@ -45,7 +45,7 @@ class RuleOrganizer implements RuleOrganizerInterface */ public function organize(array $conditions) { - // TODO: Implement organize() method. + // @todo: Implement organize() method. } } \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/CouponAbstract.php b/core/lib/Thelia/Coupon/Type/CouponAbstract.php index f3aa392bc..d3107faa7 100644 --- a/core/lib/Thelia/Coupon/Type/CouponAbstract.php +++ b/core/lib/Thelia/Coupon/Type/CouponAbstract.php @@ -26,7 +26,7 @@ namespace Thelia\Coupon\Type; use Symfony\Component\Intl\Exception\NotImplementedException; use Thelia\Condition\ConditionEvaluator; use Thelia\Core\Translation\Translator; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Coupon\ConditionCollection; use Thelia\Coupon\RuleOrganizerInterface; use Thelia\Exception\InvalidConditionException; @@ -44,7 +44,7 @@ use Thelia\Exception\InvalidConditionException; */ abstract class CouponAbstract implements CouponInterface { - /** @var AdapterInterface Provide necessary value from Thelia */ + /** @var FacadeInterface Provide necessary value from Thelia */ protected $adapter = null; /** @var Translator Service Translator */ @@ -104,9 +104,9 @@ abstract class CouponAbstract implements CouponInterface /** * 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(); @@ -195,7 +195,7 @@ abstract class CouponAbstract implements CouponInterface * * @return float Amount removed from the Total Checkout */ - public function getDiscount() + public function exec() { return $this->amount; } @@ -298,7 +298,7 @@ abstract class CouponAbstract implements CouponInterface /** * Check if the current state of the application is matching this Coupon conditions - * Thelia variables are given by the AdapterInterface + * Thelia variables are given by the FacadeInterface * * @return bool */ @@ -307,5 +307,4 @@ abstract class CouponAbstract implements CouponInterface return $this->conditionEvaluator->isMatching($this->conditions); } - } diff --git a/core/lib/Thelia/Coupon/Type/CouponInterface.php b/core/lib/Thelia/Coupon/Type/CouponInterface.php index 192a608e8..b88039b5c 100644 --- a/core/lib/Thelia/Coupon/Type/CouponInterface.php +++ b/core/lib/Thelia/Coupon/Type/CouponInterface.php @@ -23,7 +23,6 @@ namespace Thelia\Coupon\Type; -use Thelia\Coupon\AdapterInterface; use Thelia\Coupon\ConditionCollection; /** @@ -205,11 +204,11 @@ interface CouponInterface * * @return float Amount removed from the Total Checkout */ - public function getDiscount(); + public function exec(); /** * Check if the current Coupon is matching its conditions (Rules) - * Thelia variables are given by the AdapterInterface + * Thelia variables are given by the FacadeInterface * * @return bool */ diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php deleted file mode 100644 index 717807da7..000000000 --- a/core/lib/Thelia/Coupon/Type/RemoveXPercentForCategoryY.php +++ /dev/null @@ -1,38 +0,0 @@ -. */ -/* */ -/**********************************************************************************/ - -namespace Thelia\Coupon\Type; - -/** - * Created by JetBrains PhpStorm. - * Date: 8/19/13 - * Time: 3:24 PM - * - * @package Coupon - * @author Guillaume MOREL - * - */ -class RemoveXPercentForCategoryY extends RemoveXPercent -{ - -} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php deleted file mode 100644 index bb052cd68..000000000 --- a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductSaleElementIdY.php +++ /dev/null @@ -1,38 +0,0 @@ -. */ -/* */ -/**********************************************************************************/ - -namespace Thelia\Coupon\Type; - -/** - * Created by JetBrains PhpStorm. - * Date: 8/19/13 - * Time: 3:24 PM - * - * @package Coupon - * @author Guillaume MOREL - * - */ -class RemoveXPercentForProductSaleElementIdY extends RemoveXPercent -{ - -} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php deleted file mode 100644 index 0b88ca44d..000000000 --- a/core/lib/Thelia/Coupon/Type/RemoveXPercentForProductY.php +++ /dev/null @@ -1,38 +0,0 @@ -. */ -/* */ -/**********************************************************************************/ - -namespace Thelia\Coupon\Type; - -/** - * Created by JetBrains PhpStorm. - * Date: 8/19/13 - * Time: 3:24 PM - * - * @package Coupon - * @author Guillaume MOREL - * - */ -class RemoveXPercentForProductY extends RemoveXPercent -{ - -} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentManager.php b/core/lib/Thelia/Coupon/Type/RemoveXPercentManager.php index d5c45b4d3..b0a8e82cd 100644 --- a/core/lib/Thelia/Coupon/Type/RemoveXPercentManager.php +++ b/core/lib/Thelia/Coupon/Type/RemoveXPercentManager.php @@ -98,7 +98,7 @@ class RemoveXPercentManager extends CouponAbstract * @throws \InvalidArgumentException * @return float */ - public function getDiscount() + public function exec() { if ($this->percent >= 100) { throw new \InvalidArgumentException( diff --git a/core/lib/Thelia/Form/AdministratorCreationForm.php b/core/lib/Thelia/Form/AdministratorCreationForm.php new file mode 100644 index 000000000..afab36cac --- /dev/null +++ b/core/lib/Thelia/Form/AdministratorCreationForm.php @@ -0,0 +1,138 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\ExecutionContextInterface; +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Security\Resource\AdminResources; +use Thelia\Core\Translation\Translator; +use Thelia\Model\AdminQuery; +use Thelia\Model\ProfileQuery; +use Thelia\Model\ConfigQuery; + +class AdministratorCreationForm extends BaseForm +{ + const PROFILE_FIELD_PREFIX = "profile"; + + protected function buildForm() + { + $this->formBuilder + ->add("login", "text", array( + "constraints" => array( + new Constraints\NotBlank(), + new Constraints\Callback(array( + "methods" => array( + array($this, "verifyExistingLogin"), + ) + )), + ), + "label" => Translator::getInstance()->trans("Login"), + "label_attr" => array( + "for" => "login" + ), + )) + ->add("firstname", "text", array( + "constraints" => array( + new Constraints\NotBlank() + ), + "label" => Translator::getInstance()->trans("First Name"), + "label_attr" => array( + "for" => "firstname" + ), + )) + ->add("lastname", "text", array( + "constraints" => array( + new Constraints\NotBlank() + ), + "label" => Translator::getInstance()->trans("Last Name"), + "label_attr" => array( + "for" => "lastname" + ) + )) + ->add("password", "password", array( + "constraints" => array(), + "label" => Translator::getInstance()->trans("Password"), + "label_attr" => array( + "for" => "password" + ), + )) + ->add("password_confirm", "password", array( + "constraints" => array( + new Constraints\Callback(array("methods" => array( + array($this, "verifyPasswordField") + ))) + ), + "label" => "Password confirmation", + "label_attr" => array( + "for" => "password_confirmation" + ), + )) + ->add( + 'profile', + "choice", + array( + "choices" => ProfileQuery::getProfileList(), + "constraints" => array( + new Constraints\NotBlank(), + ), + "label" => "Profile", + "label_attr" => array( + "for" => "profile" + ), + ) + ) + ; + } + + public function verifyPasswordField($value, ExecutionContextInterface $context) + { + $data = $context->getRoot()->getData(); + + if($data["password"] === '' && $data["password_confirm"] === '') { + $context->addViolation("password can't be empty"); + } + + if ($data["password"] != $data["password_confirm"]) { + $context->addViolation("password confirmation is not the same as password field"); + } + + if(strlen($data["password"]) < 4) { + $context->addViolation("password must be composed of at least 4 characters"); + } + } + + public function verifyExistingLogin($value, ExecutionContextInterface $context) + { + $administrator = AdminQuery::create()->findOneByLogin($value); + if ($administrator !== null) { + $context->addViolation("This login already exists"); + } + } + + public function getName() + { + return "thelia_admin_administrator_creation"; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Form/AdministratorModificationForm.php b/core/lib/Thelia/Form/AdministratorModificationForm.php new file mode 100755 index 000000000..68ad228a5 --- /dev/null +++ b/core/lib/Thelia/Form/AdministratorModificationForm.php @@ -0,0 +1,97 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Symfony\Component\Validator\ExecutionContextInterface; +use Thelia\Core\Translation\Translator; +use Thelia\Model\AdminQuery; + +class AdministratorModificationForm extends AdministratorCreationForm +{ + protected function buildForm() + { + parent::buildForm(); + + $this->formBuilder + ->add("id", "hidden", array( + "required" => true, + "constraints" => array( + new Constraints\NotBlank(), + new Constraints\Callback( + array( + "methods" => array( + array($this, "verifyAdministratorId"), + ), + ) + ), + ), + "attr" => array( + "id" => "administrator_update_id", + ), + )) + ; + } + + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return "thelia_admin_administrator_modification"; + } + + public function verifyAdministratorId($value, ExecutionContextInterface $context) + { + $administrator = AdminQuery::create() + ->findPk($value); + + if (null === $administrator) { + $context->addViolation("Administrator ID not found"); + } + } + + public function verifyExistingLogin($value, ExecutionContextInterface $context) + { + $data = $context->getRoot()->getData(); + + $administrator = AdminQuery::create()->findOneByLogin($value); + if ($administrator !== null && $administrator->getId() != $data['id']) { + $context->addViolation("This login already exists"); + } + } + + public function verifyPasswordField($value, ExecutionContextInterface $context) + { + $data = $context->getRoot()->getData(); + + if ($data["password"] != $data["password_confirm"]) { + $context->addViolation("password confirmation is not the same as password field"); + } + + if($data["password"] !== '' && strlen($data["password"]) < 4) { + $context->addViolation("password must be composed of at least 4 characters"); + } + } +} diff --git a/core/lib/Thelia/Form/AdminProfileCreationForm.php b/core/lib/Thelia/Form/CouponCode.php old mode 100644 new mode 100755 similarity index 61% rename from core/lib/Thelia/Form/AdminProfileCreationForm.php rename to core/lib/Thelia/Form/CouponCode.php index 34ce7556b..06dceb177 --- a/core/lib/Thelia/Form/AdminProfileCreationForm.php +++ b/core/lib/Thelia/Form/CouponCode.php @@ -1,7 +1,7 @@ . */ +/* along with this program. If not, see . */ /* */ /*************************************************************************************/ namespace Thelia\Form; use Symfony\Component\Validator\Constraints; -use Symfony\Component\Validator\Constraints\NotBlank; -use Thelia\Core\Translation\Translator; +use Thelia\Model\ModuleQuery; +use Thelia\Module\BaseModule; -class AdminProfileCreationForm extends BaseForm +/** + * Class CouponCode + * + * Manage how a coupon is entered by a customer + * + * @package Thelia\Form + * @author Guillaume MOREL + */ +class CouponCode extends BaseForm { + /** + * Build form + */ protected function buildForm() { $this->formBuilder - ->add("wording" , "text" , array( + ->add("coupon-code", "text", array( + "required" => true, "constraints" => array( - new NotBlank() - ), - "label" => Translator::getInstance()->trans("Wording *"), - "label_attr" => array( - "for" => "wording" - )) + new Constraints\NotBlank(), + ) ) - ->add("name" , "text" , array( - "constraints" => array( - new NotBlank() - ), - "label" => Translator::getInstance()->trans("Name *"), - "label_attr" => array( - "for" => "name" - )) - ) - ->add("description" , "text" , array( - "label" => Translator::getInstance()->trans("Description"), - "label_attr" => array( - "for" => "description" - )) - ) - ; + ); } + /** + * Form name + * + * @return string + */ public function getName() { - return "thelia_admin_profile_creation"; + return "thelia_coupon_code"; } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Form/CouponCreationForm.php b/core/lib/Thelia/Form/CouponCreationForm.php index 8edc26fbf..448f65e38 100755 --- a/core/lib/Thelia/Form/CouponCreationForm.php +++ b/core/lib/Thelia/Form/CouponCreationForm.php @@ -27,6 +27,7 @@ use Symfony\Component\Validator\Constraints\Date; use Symfony\Component\Validator\Constraints\GreaterThanOrEqual; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotEqualTo; +use Symfony\Component\Validator\Constraints\Range; /** * Created by JetBrains PhpStorm. @@ -109,7 +110,7 @@ class CouponCreationForm extends BaseForm ) ->add( 'isEnabled', - 'checkbox', + 'text', array() ) ->add( @@ -124,17 +125,17 @@ class CouponCreationForm extends BaseForm ) ->add( 'isCumulative', - 'checkbox', + 'text', array() ) ->add( 'isRemovingPostage', - 'checkbox', + 'text', array() ) ->add( 'isAvailableOnSpecialOffers', - 'checkbox', + 'text', array() ) ->add( diff --git a/core/lib/Thelia/Form/Lang/LangCreateForm.php b/core/lib/Thelia/Form/Lang/LangCreateForm.php new file mode 100644 index 000000000..deef71802 --- /dev/null +++ b/core/lib/Thelia/Form/Lang/LangCreateForm.php @@ -0,0 +1,116 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Form\Lang; +use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Form\BaseForm; +use Thelia\Core\Translation\Translator; + + +/** + * Class LangCreateForm + * @package Thelia\Form\Lang + * @author Manuel Raynaud + */ +class LangCreateForm extends BaseForm +{ + + /** + * + * in this function you add all the fields you need for your Form. + * Form this you have to call add method on $this->formBuilder attribute : + * + * $this->formBuilder->add("name", "text") + * ->add("email", "email", array( + * "attr" => array( + * "class" => "field" + * ), + * "label" => "email", + * "constraints" => array( + * new \Symfony\Component\Validator\Constraints\NotBlank() + * ) + * ) + * ) + * ->add('age', 'integer'); + * + * @return null + */ + protected function buildForm() + { + $this->formBuilder + ->add('title', 'text', array( + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans('Language name'), + 'label_attr' => array( + 'for' => 'title_lang' + ) + )) + ->add('code', 'text', array( + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans('ISO 639 Code'), + 'label_attr' => array( + 'for' => 'code_lang' + ) + )) + ->add('locale', 'text', array( + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans('language locale'), + 'label_attr' => array( + 'for' => 'locale_lang' + ) + )) + ->add('date_format', 'text', array( + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans('date format'), + 'label_attr' => array( + 'for' => 'date_lang' + ) + )) + ->add('time_format', 'text', array( + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans('time format'), + 'label_attr' => array( + 'for' => 'time_lang' + ) + )) + ; + } + + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return 'thelia_language_create'; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Form/Lang/LangDefaultBehaviorForm.php b/core/lib/Thelia/Form/Lang/LangDefaultBehaviorForm.php new file mode 100644 index 000000000..23418a392 --- /dev/null +++ b/core/lib/Thelia/Form/Lang/LangDefaultBehaviorForm.php @@ -0,0 +1,85 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Form\Lang; + +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\Range; +use Thelia\Form\BaseForm; +use Thelia\Core\Translation\Translator; + + +/** + * Class LangDefaultBehaviorForm + * @package Thelia\Form\Lang + * @author Manuel Raynaud + */ +class LangDefaultBehaviorForm extends BaseForm +{ + + /** + * + * in this function you add all the fields you need for your Form. + * Form this you have to call add method on $this->formBuilder attribute : + * + * $this->formBuilder->add("name", "text") + * ->add("email", "email", array( + * "attr" => array( + * "class" => "field" + * ), + * "label" => "email", + * "constraints" => array( + * new \Symfony\Component\Validator\Constraints\NotBlank() + * ) + * ) + * ) + * ->add('age', 'integer'); + * + * @return null + */ + protected function buildForm() + { + $this->formBuilder + ->add('behavior', 'choice', array( + 'choices' => array( + 0 => Translator::getInstance()->trans("Strictly use the requested language"), + 1 => Translator::getInstance()->trans("Replace by the default language"), + ), + 'constraints' => array( + new NotBlank() + ), + 'label' => Translator::getInstance()->trans("If a translation is missing or incomplete :"), + 'label_attr' => array( + 'for' => 'defaultBehavior-form' + ) + )); + } + + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return 'thelia_lang_defaultBehavior'; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Form/LanguageCreationForm.php b/core/lib/Thelia/Form/Lang/LangUpdateForm.php similarity index 70% rename from core/lib/Thelia/Form/LanguageCreationForm.php rename to core/lib/Thelia/Form/Lang/LangUpdateForm.php index 713cafcd9..0463335f7 100644 --- a/core/lib/Thelia/Form/LanguageCreationForm.php +++ b/core/lib/Thelia/Form/Lang/LangUpdateForm.php @@ -20,39 +20,35 @@ /* along with this program. If not, see . */ /* */ /*************************************************************************************/ -namespace Thelia\Form; +namespace Thelia\Form\Lang; +use Symfony\Component\Validator\Constraints\GreaterThan; use Symfony\Component\Validator\Constraints\NotBlank; -use Thelia\Core\Translation\Translator; -class LanguageCreationForm extends BaseForm + +/** + * Class LangUpdateForm + * @package Thelia\Form\Lang + * @author Manuel Raynaud + */ +class LangUpdateForm extends LangCreateForm { - protected function buildForm() + + public function buildForm() { + parent::buildForm(); + $this->formBuilder - ->add("title", "text", array( - "constraints" => array( - new NotBlank() - ), - "label" => Translator::getInstance()->trans("Language title *"), - "label_attr" => array( - "for" => "title" + ->add('id', 'hidden', array( + 'constraints' => array( + new NotBlank(), + new GreaterThan(array('value' => 0)) ) - )) - ->add("isocode", "text", array( - "constraints" => array( - new NotBlank() - ), - "label" => Translator::getInstance()->trans("ISO Code *"), - "label_attr" => array( - "for" => "isocode" - ) - )) - ; + )); } public function getName() { - return "thelia_language_creation"; + return 'thelia_lang_update'; } -} +} \ No newline at end of file diff --git a/core/lib/Thelia/Form/Lang/LangUrlEvent.php b/core/lib/Thelia/Form/Lang/LangUrlEvent.php new file mode 100644 index 000000000..de8248c81 --- /dev/null +++ b/core/lib/Thelia/Form/Lang/LangUrlEvent.php @@ -0,0 +1,46 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Form\Lang; +use Thelia\Core\Event\ActionEvent; + + +/** + * Class LangUrlEvent + * @package Thelia\Form\Lang + * @author Manuel Raynaud + */ +class LangUrlEvent extends ActionEvent +{ + protected $url = array(); + + public function addUrl($id, $url) + { + $this->url[$id] = $url; + } + + public function getUrl() + { + return $this->url; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Form/Lang/LangUrlForm.php b/core/lib/Thelia/Form/Lang/LangUrlForm.php new file mode 100644 index 000000000..ec9837329 --- /dev/null +++ b/core/lib/Thelia/Form/Lang/LangUrlForm.php @@ -0,0 +1,87 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Form\Lang; +use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Form\BaseForm; +use Thelia\Model\LangQuery; + + +/** + * Class LangUrlForm + * @package Thelia\Form\Lang + * @author Manuel Raynaud + */ +class LangUrlForm extends BaseForm +{ + const LANG_PREFIX = 'url_'; + + /** + * + * in this function you add all the fields you need for your Form. + * Form this you have to call add method on $this->formBuilder attribute : + * + * $this->formBuilder->add("name", "text") + * ->add("email", "email", array( + * "attr" => array( + * "class" => "field" + * ), + * "label" => "email", + * "constraints" => array( + * new \Symfony\Component\Validator\Constraints\NotBlank() + * ) + * ) + * ) + * ->add('age', 'integer'); + * + * @return null + */ + protected function buildForm() + { + foreach (LangQuery::create()->find() as $lang) { + $this->formBuilder->add( + self::LANG_PREFIX . $lang->getId(), + 'text', + array( + 'constraints' => array( + new NotBlank() + ), + "attr" => array( + "tag" => "url", + "url_id" => $lang->getId(), + "url_title" => $lang->getTitle() + ), + + ) + ); + } + } + + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return 'thelia_language_url'; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php b/core/lib/Thelia/Form/ProductDefaultSaleElementUpdateForm.php similarity index 65% rename from core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php rename to core/lib/Thelia/Form/ProductDefaultSaleElementUpdateForm.php index f0a7ef472..807f8ac07 100644 --- a/core/lib/Thelia/Coupon/Type/RemoveXPercentForAttributeY.php +++ b/core/lib/Thelia/Form/ProductDefaultSaleElementUpdateForm.php @@ -1,38 +1,31 @@ . */ -/* */ -/**********************************************************************************/ +/*************************************************************************************/ +/* */ +/* Thelia */ +/* */ +/* Copyright (c) OpenStudio */ +/* email : info@thelia.net */ +/* web : http://www.thelia.net */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of the GNU General Public License as published by */ +/* the Free Software Foundation; either version 3 of the License */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU General Public License */ +/* along with this program. If not, see . */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; -namespace Thelia\Coupon\Type; - -/** - * Created by JetBrains PhpStorm. - * Date: 8/19/13 - * Time: 3:24 PM - * - * @package Coupon - * @author Guillaume MOREL - * - */ -class RemoveXPercentForAttributeY extends RemoveXPercent +class ProductDefaultSaleElementUpdateForm extends ProductSaleElementUpdateForm { - -} \ No newline at end of file + public function getName() + { + return "thelia_product_default_sale_element_update_form"; + } +} diff --git a/core/lib/Thelia/Form/ProductDetailsModificationForm.php b/core/lib/Thelia/Form/ProductSaleElementUpdateForm.php similarity index 71% rename from core/lib/Thelia/Form/ProductDetailsModificationForm.php rename to core/lib/Thelia/Form/ProductSaleElementUpdateForm.php index dbc6bb238..e3a74a755 100644 --- a/core/lib/Thelia/Form/ProductDetailsModificationForm.php +++ b/core/lib/Thelia/Form/ProductSaleElementUpdateForm.php @@ -25,28 +25,33 @@ namespace Thelia\Form; use Symfony\Component\Validator\Constraints\GreaterThan; use Thelia\Core\Translation\Translator; use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Model\Currency; -class ProductDetailsModificationForm extends BaseForm +class ProductSaleElementUpdateForm extends BaseForm { use StandardDescriptionFieldsTrait; protected function buildForm() { $this->formBuilder - ->add("id", "integer", array( - "label" => Translator::getInstance()->trans("Prodcut ID *"), - "label_attr" => array("for" => "product_id_field"), - "constraints" => array(new GreaterThan(array('value' => 0))) + ->add("product_id", "integer", array( + "label" => Translator::getInstance()->trans("Product ID *"), + "label_attr" => array("for" => "product_id_field"), + "constraints" => array(new GreaterThan(array('value' => 0))) + )) + ->add("product_sale_element_id", "integer", array( + "label" => Translator::getInstance()->trans("Product sale element ID *"), + "label_attr" => array("for" => "product_sale_element_id_field") + )) + ->add("reference", "text", array( + "label" => Translator::getInstance()->trans("Reference *"), + "label_attr" => array("for" => "reference_field") )) ->add("price", "number", array( "constraints" => array(new NotBlank()), - "label" => Translator::getInstance()->trans("Product base price excluding taxes *"), + "label" => Translator::getInstance()->trans("Product price excluding taxes *"), "label_attr" => array("for" => "price_field") )) - ->add("price_with_tax", "number", array( - "label" => Translator::getInstance()->trans("Product base price including taxes *"), - "label_attr" => array("for" => "price_with_tax_field") - )) ->add("currency", "integer", array( "constraints" => array(new NotBlank()), "label" => Translator::getInstance()->trans("Price currency *"), @@ -64,11 +69,11 @@ class ProductDetailsModificationForm extends BaseForm )) ->add("quantity", "number", array( "constraints" => array(new NotBlank()), - "label" => Translator::getInstance()->trans("Current quantity *"), + "label" => Translator::getInstance()->trans("Available quantity *"), "label_attr" => array("for" => "quantity_field") )) ->add("sale_price", "number", array( - "label" => Translator::getInstance()->trans("Sale price *"), + "label" => Translator::getInstance()->trans("Sale price without taxes *"), "label_attr" => array("for" => "price_with_tax_field") )) ->add("onsale", "integer", array( @@ -79,12 +84,23 @@ class ProductDetailsModificationForm extends BaseForm "label" => Translator::getInstance()->trans("Advertise this product as new"), "label_attr" => array("for" => "isnew_field") )) - + ->add("isdefault", "integer", array( + "label" => Translator::getInstance()->trans("Is it the default product sale element ?"), + "label_attr" => array("for" => "isdefault_field") + )) + ->add("ean_code", "integer", array( + "label" => Translator::getInstance()->trans("EAN Code"), + "label_attr" => array("for" => "ean_code_field") + )) + ->add("use_exchange_rate", "integer", array( + "label" => Translator::getInstance()->trans("Apply exchange rates on price in %sym", array("%sym" => Currency::getDefaultCurrency()->getSymbol())), + "label_attr" => array("for" => "use_exchange_rate_field") + )) ; } public function getName() { - return "thelia_product_details_modification"; + return "thelia_product_sale_element_update_form"; } } diff --git a/core/lib/Thelia/Form/ProfileUpdateModuleAccessForm.php b/core/lib/Thelia/Form/ProfileUpdateModuleAccessForm.php new file mode 100644 index 000000000..fcbee854f --- /dev/null +++ b/core/lib/Thelia/Form/ProfileUpdateModuleAccessForm.php @@ -0,0 +1,98 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\ExecutionContextInterface; +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Translation\Translator; +use Thelia\Model\ProfileQuery; +use Thelia\Model\ModuleQuery; + +/** + * Class ProfileUpdateModuleAccessForm + * @package Thelia\Form + * @author Etienne Roudeix + */ +class ProfileUpdateModuleAccessForm extends BaseForm +{ + const MODULE_ACCESS_FIELD_PREFIX = "module"; + + protected function buildForm($change_mode = false) + { + $this->formBuilder + ->add("id", "hidden", array( + "required" => true, + "constraints" => array( + new Constraints\NotBlank(), + new Constraints\Callback( + array( + "methods" => array( + array($this, "verifyProfileId"), + ), + ) + ), + ) + )) + ; + + foreach(ModuleQuery::create()->find() as $module) { + $this->formBuilder->add( + self::MODULE_ACCESS_FIELD_PREFIX . ':' . str_replace(".", ":", $module->getCode()), + "choice", + array( + "choices" => array( + AccessManager::VIEW => AccessManager::VIEW, + AccessManager::CREATE => AccessManager::CREATE, + AccessManager::UPDATE => AccessManager::UPDATE, + AccessManager::DELETE => AccessManager::DELETE, + ), + "attr" => array( + "tag" => "modules", + "module_code" => $module->getCode(), + ), + "multiple" => true, + "constraints" => array( + + ) + ) + ); + } + } + + public function getName() + { + return "thelia_profile_module_access_modification"; + } + + public function verifyProfileId($value, ExecutionContextInterface $context) + { + $profile = ProfileQuery::create() + ->findPk($value); + + if (null === $profile) { + $context->addViolation("Profile ID not found"); + } + } +} diff --git a/core/lib/Thelia/Form/ProfileUpdateResourceAccessForm.php b/core/lib/Thelia/Form/ProfileUpdateResourceAccessForm.php new file mode 100644 index 000000000..99ef2ccf3 --- /dev/null +++ b/core/lib/Thelia/Form/ProfileUpdateResourceAccessForm.php @@ -0,0 +1,98 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\ExecutionContextInterface; +use Thelia\Core\Security\AccessManager; +use Thelia\Core\Translation\Translator; +use Thelia\Model\ProfileQuery; +use Thelia\Model\ResourceQuery; + +/** + * Class ProfileUpdateResourceAccessForm + * @package Thelia\Form + * @author Etienne Roudeix + */ +class ProfileUpdateResourceAccessForm extends BaseForm +{ + const RESOURCE_ACCESS_FIELD_PREFIX = "resource"; + + protected function buildForm($change_mode = false) + { + $this->formBuilder + ->add("id", "hidden", array( + "required" => true, + "constraints" => array( + new Constraints\NotBlank(), + new Constraints\Callback( + array( + "methods" => array( + array($this, "verifyProfileId"), + ), + ) + ), + ) + )) + ; + + foreach(ResourceQuery::create()->find() as $resource) { + $this->formBuilder->add( + self::RESOURCE_ACCESS_FIELD_PREFIX . ':' . str_replace(".", ":", $resource->getCode()), + "choice", + array( + "choices" => array( + AccessManager::VIEW => AccessManager::VIEW, + AccessManager::CREATE => AccessManager::CREATE, + AccessManager::UPDATE => AccessManager::UPDATE, + AccessManager::DELETE => AccessManager::DELETE, + ), + "attr" => array( + "tag" => "resources", + "resource_code" => $resource->getCode(), + ), + "multiple" => true, + "constraints" => array( + + ) + ) + ); + } + } + + public function getName() + { + return "thelia_profile_resource_access_modification"; + } + + public function verifyProfileId($value, ExecutionContextInterface $context) + { + $profile = ProfileQuery::create() + ->findPk($value); + + if (null === $profile) { + $context->addViolation("Profile ID not found"); + } + } +} diff --git a/core/lib/Thelia/Model/Admin.php b/core/lib/Thelia/Model/Admin.php index 1c13ea6f1..84fb65b35 100755 --- a/core/lib/Thelia/Model/Admin.php +++ b/core/lib/Thelia/Model/Admin.php @@ -10,6 +10,7 @@ use Thelia\Core\Security\Role\Role; use Thelia\Model\Base\Admin as BaseAdmin; use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Model\Tools\ModelEventDispatcherTrait; /** * Skeleton subclass for representing a row from the 'admin' table. @@ -24,6 +25,8 @@ use Propel\Runtime\Connection\ConnectionInterface; */ class Admin extends BaseAdmin implements UserInterface { + use ModelEventDispatcherTrait; + public function getPermissions() { $profileId = $this->getProfileId(); diff --git a/core/lib/Thelia/Model/Base/Country.php b/core/lib/Thelia/Model/Base/Country.php index eb8312369..299b3e511 100644 --- a/core/lib/Thelia/Model/Base/Country.php +++ b/core/lib/Thelia/Model/Base/Country.php @@ -95,10 +95,18 @@ abstract class Country implements ActiveRecordInterface /** * The value for the by_default field. + * Note: this column has a database default value of: 0 * @var int */ protected $by_default; + /** + * The value for the shop_country field. + * Note: this column has a database default value of: false + * @var boolean + */ + protected $shop_country; + /** * The value for the created_at field. * @var string @@ -174,11 +182,25 @@ abstract class Country implements ActiveRecordInterface */ protected $countryI18nsScheduledForDeletion = null; + /** + * Applies default values to this object. + * This method should be called from the object's constructor (or + * equivalent initialization method). + * @see __construct() + */ + public function applyDefaultValues() + { + $this->by_default = 0; + $this->shop_country = false; + } + /** * Initializes internal state of Thelia\Model\Base\Country object. + * @see applyDefaults() */ public function __construct() { + $this->applyDefaultValues(); } /** @@ -498,6 +520,17 @@ abstract class Country implements ActiveRecordInterface return $this->by_default; } + /** + * Get the [shop_country] column value. + * + * @return boolean + */ + public function getShopCountry() + { + + return $this->shop_country; + } + /** * Get the [optionally formatted] temporal [created_at] column value. * @@ -668,6 +701,35 @@ abstract class Country implements ActiveRecordInterface return $this; } // setByDefault() + /** + * Sets the value of the [shop_country] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\Country The current object (for fluent API support) + */ + public function setShopCountry($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->shop_country !== $v) { + $this->shop_country = $v; + $this->modifiedColumns[] = CountryTableMap::SHOP_COUNTRY; + } + + + return $this; + } // setShopCountry() + /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * @@ -720,6 +782,14 @@ abstract class Country implements ActiveRecordInterface */ public function hasOnlyDefaultValues() { + if ($this->by_default !== 0) { + return false; + } + + if ($this->shop_country !== false) { + return false; + } + // otherwise, everything was equal, so return TRUE return true; } // hasOnlyDefaultValues() @@ -765,13 +835,16 @@ abstract class Country implements ActiveRecordInterface $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CountryTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)]; $this->by_default = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CountryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CountryTableMap::translateFieldName('ShopCountry', TableMap::TYPE_PHPNAME, $indexType)]; + $this->shop_country = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CountryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CountryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CountryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } @@ -784,7 +857,7 @@ abstract class Country implements ActiveRecordInterface $this->ensureConsistency(); } - return $startcol + 8; // 8 = CountryTableMap::NUM_HYDRATE_COLUMNS. + return $startcol + 9; // 9 = CountryTableMap::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating \Thelia\Model\Country object", 0, $e); @@ -1095,6 +1168,9 @@ abstract class Country implements ActiveRecordInterface if ($this->isColumnModified(CountryTableMap::BY_DEFAULT)) { $modifiedColumns[':p' . $index++] = 'BY_DEFAULT'; } + if ($this->isColumnModified(CountryTableMap::SHOP_COUNTRY)) { + $modifiedColumns[':p' . $index++] = 'SHOP_COUNTRY'; + } if ($this->isColumnModified(CountryTableMap::CREATED_AT)) { $modifiedColumns[':p' . $index++] = 'CREATED_AT'; } @@ -1130,6 +1206,9 @@ abstract class Country implements ActiveRecordInterface case 'BY_DEFAULT': $stmt->bindValue($identifier, $this->by_default, PDO::PARAM_INT); break; + case 'SHOP_COUNTRY': + $stmt->bindValue($identifier, (int) $this->shop_country, PDO::PARAM_INT); + break; case 'CREATED_AT': $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); break; @@ -1217,9 +1296,12 @@ abstract class Country implements ActiveRecordInterface return $this->getByDefault(); break; case 6: - return $this->getCreatedAt(); + return $this->getShopCountry(); break; case 7: + return $this->getCreatedAt(); + break; + case 8: return $this->getUpdatedAt(); break; default: @@ -1257,8 +1339,9 @@ abstract class Country implements ActiveRecordInterface $keys[3] => $this->getIsoalpha2(), $keys[4] => $this->getIsoalpha3(), $keys[5] => $this->getByDefault(), - $keys[6] => $this->getCreatedAt(), - $keys[7] => $this->getUpdatedAt(), + $keys[6] => $this->getShopCountry(), + $keys[7] => $this->getCreatedAt(), + $keys[8] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1331,9 +1414,12 @@ abstract class Country implements ActiveRecordInterface $this->setByDefault($value); break; case 6: - $this->setCreatedAt($value); + $this->setShopCountry($value); break; case 7: + $this->setCreatedAt($value); + break; + case 8: $this->setUpdatedAt($value); break; } // switch() @@ -1366,8 +1452,9 @@ abstract class Country implements ActiveRecordInterface if (array_key_exists($keys[3], $arr)) $this->setIsoalpha2($arr[$keys[3]]); if (array_key_exists($keys[4], $arr)) $this->setIsoalpha3($arr[$keys[4]]); if (array_key_exists($keys[5], $arr)) $this->setByDefault($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]); - if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]); + if (array_key_exists($keys[6], $arr)) $this->setShopCountry($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]); } /** @@ -1385,6 +1472,7 @@ abstract class Country implements ActiveRecordInterface if ($this->isColumnModified(CountryTableMap::ISOALPHA2)) $criteria->add(CountryTableMap::ISOALPHA2, $this->isoalpha2); if ($this->isColumnModified(CountryTableMap::ISOALPHA3)) $criteria->add(CountryTableMap::ISOALPHA3, $this->isoalpha3); if ($this->isColumnModified(CountryTableMap::BY_DEFAULT)) $criteria->add(CountryTableMap::BY_DEFAULT, $this->by_default); + if ($this->isColumnModified(CountryTableMap::SHOP_COUNTRY)) $criteria->add(CountryTableMap::SHOP_COUNTRY, $this->shop_country); if ($this->isColumnModified(CountryTableMap::CREATED_AT)) $criteria->add(CountryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CountryTableMap::UPDATED_AT)) $criteria->add(CountryTableMap::UPDATED_AT, $this->updated_at); @@ -1455,6 +1543,7 @@ abstract class Country implements ActiveRecordInterface $copyObj->setIsoalpha2($this->getIsoalpha2()); $copyObj->setIsoalpha3($this->getIsoalpha3()); $copyObj->setByDefault($this->getByDefault()); + $copyObj->setShopCountry($this->getShopCountry()); $copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setUpdatedAt($this->getUpdatedAt()); @@ -2359,10 +2448,12 @@ abstract class Country implements ActiveRecordInterface $this->isoalpha2 = null; $this->isoalpha3 = null; $this->by_default = null; + $this->shop_country = null; $this->created_at = null; $this->updated_at = null; $this->alreadyInSave = false; $this->clearAllReferences(); + $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); diff --git a/core/lib/Thelia/Model/Base/CountryQuery.php b/core/lib/Thelia/Model/Base/CountryQuery.php index 5e60f1821..9135e293a 100644 --- a/core/lib/Thelia/Model/Base/CountryQuery.php +++ b/core/lib/Thelia/Model/Base/CountryQuery.php @@ -28,6 +28,7 @@ use Thelia\Model\Map\CountryTableMap; * @method ChildCountryQuery orderByIsoalpha2($order = Criteria::ASC) Order by the isoalpha2 column * @method ChildCountryQuery orderByIsoalpha3($order = Criteria::ASC) Order by the isoalpha3 column * @method ChildCountryQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column + * @method ChildCountryQuery orderByShopCountry($order = Criteria::ASC) Order by the shop_country column * @method ChildCountryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildCountryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * @@ -37,6 +38,7 @@ use Thelia\Model\Map\CountryTableMap; * @method ChildCountryQuery groupByIsoalpha2() Group by the isoalpha2 column * @method ChildCountryQuery groupByIsoalpha3() Group by the isoalpha3 column * @method ChildCountryQuery groupByByDefault() Group by the by_default column + * @method ChildCountryQuery groupByShopCountry() Group by the shop_country column * @method ChildCountryQuery groupByCreatedAt() Group by the created_at column * @method ChildCountryQuery groupByUpdatedAt() Group by the updated_at column * @@ -69,6 +71,7 @@ use Thelia\Model\Map\CountryTableMap; * @method ChildCountry findOneByIsoalpha2(string $isoalpha2) Return the first ChildCountry filtered by the isoalpha2 column * @method ChildCountry findOneByIsoalpha3(string $isoalpha3) Return the first ChildCountry filtered by the isoalpha3 column * @method ChildCountry findOneByByDefault(int $by_default) Return the first ChildCountry filtered by the by_default column + * @method ChildCountry findOneByShopCountry(boolean $shop_country) Return the first ChildCountry filtered by the shop_country column * @method ChildCountry findOneByCreatedAt(string $created_at) Return the first ChildCountry filtered by the created_at column * @method ChildCountry findOneByUpdatedAt(string $updated_at) Return the first ChildCountry filtered by the updated_at column * @@ -78,6 +81,7 @@ use Thelia\Model\Map\CountryTableMap; * @method array findByIsoalpha2(string $isoalpha2) Return ChildCountry objects filtered by the isoalpha2 column * @method array findByIsoalpha3(string $isoalpha3) Return ChildCountry objects filtered by the isoalpha3 column * @method array findByByDefault(int $by_default) Return ChildCountry objects filtered by the by_default column + * @method array findByShopCountry(boolean $shop_country) Return ChildCountry objects filtered by the shop_country column * @method array findByCreatedAt(string $created_at) Return ChildCountry objects filtered by the created_at column * @method array findByUpdatedAt(string $updated_at) Return ChildCountry objects filtered by the updated_at column * @@ -168,7 +172,7 @@ abstract class CountryQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT ID, AREA_ID, ISOCODE, ISOALPHA2, ISOALPHA3, BY_DEFAULT, CREATED_AT, UPDATED_AT FROM country WHERE ID = :p0'; + $sql = 'SELECT ID, AREA_ID, ISOCODE, ISOALPHA2, ISOALPHA3, BY_DEFAULT, SHOP_COUNTRY, CREATED_AT, UPDATED_AT FROM country WHERE ID = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -469,6 +473,33 @@ abstract class CountryQuery extends ModelCriteria return $this->addUsingAlias(CountryTableMap::BY_DEFAULT, $byDefault, $comparison); } + /** + * Filter the query on the shop_country column + * + * Example usage: + * + * $query->filterByShopCountry(true); // WHERE shop_country = true + * $query->filterByShopCountry('yes'); // WHERE shop_country = true + * + * + * @param boolean|string $shopCountry The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCountryQuery The current query, for fluid interface + */ + public function filterByShopCountry($shopCountry = null, $comparison = null) + { + if (is_string($shopCountry)) { + $shop_country = in_array(strtolower($shopCountry), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CountryTableMap::SHOP_COUNTRY, $shopCountry, $comparison); + } + /** * Filter the query on the created_at column * diff --git a/core/lib/Thelia/Model/Base/Currency.php b/core/lib/Thelia/Model/Base/Currency.php index fea63f546..2161e4425 100644 --- a/core/lib/Thelia/Model/Base/Currency.php +++ b/core/lib/Thelia/Model/Base/Currency.php @@ -1008,10 +1008,9 @@ abstract class Currency implements ActiveRecordInterface if ($this->cartsScheduledForDeletion !== null) { if (!$this->cartsScheduledForDeletion->isEmpty()) { - foreach ($this->cartsScheduledForDeletion as $cart) { - // need to save related object because we set the relation to null - $cart->save($con); - } + \Thelia\Model\CartQuery::create() + ->filterByPrimaryKeys($this->cartsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); $this->cartsScheduledForDeletion = null; } } diff --git a/core/lib/Thelia/Model/Base/Customer.php b/core/lib/Thelia/Model/Base/Customer.php index 8ec119627..857dc5e17 100644 --- a/core/lib/Thelia/Model/Base/Customer.php +++ b/core/lib/Thelia/Model/Base/Customer.php @@ -1350,10 +1350,9 @@ abstract class Customer implements ActiveRecordInterface if ($this->cartsScheduledForDeletion !== null) { if (!$this->cartsScheduledForDeletion->isEmpty()) { - foreach ($this->cartsScheduledForDeletion as $cart) { - // need to save related object because we set the relation to null - $cart->save($con); - } + \Thelia\Model\CartQuery::create() + ->filterByPrimaryKeys($this->cartsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); $this->cartsScheduledForDeletion = null; } } diff --git a/core/lib/Thelia/Model/Base/Module.php b/core/lib/Thelia/Model/Base/Module.php index 81ef0e128..3331bd57c 100644 --- a/core/lib/Thelia/Model/Base/Module.php +++ b/core/lib/Thelia/Model/Base/Module.php @@ -2733,7 +2733,10 @@ abstract class Module implements ActiveRecordInterface $profileModulesToDelete = $this->getProfileModules(new Criteria(), $con)->diff($profileModules); - $this->profileModulesScheduledForDeletion = $profileModulesToDelete; + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->profileModulesScheduledForDeletion = clone $profileModulesToDelete; foreach ($profileModulesToDelete as $profileModuleRemoved) { $profileModuleRemoved->setModule(null); @@ -2826,7 +2829,7 @@ abstract class Module implements ActiveRecordInterface $this->profileModulesScheduledForDeletion = clone $this->collProfileModules; $this->profileModulesScheduledForDeletion->clear(); } - $this->profileModulesScheduledForDeletion[]= $profileModule; + $this->profileModulesScheduledForDeletion[]= clone $profileModule; $profileModule->setModule(null); } diff --git a/core/lib/Thelia/Model/Base/ModuleQuery.php b/core/lib/Thelia/Model/Base/ModuleQuery.php index 4f953b97f..84ae33f68 100644 --- a/core/lib/Thelia/Model/Base/ModuleQuery.php +++ b/core/lib/Thelia/Model/Base/ModuleQuery.php @@ -823,7 +823,7 @@ abstract class ModuleQuery extends ModelCriteria * * @return ChildModuleQuery The current query, for fluid interface */ - public function joinProfileModule($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + public function joinProfileModule($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('ProfileModule'); @@ -858,7 +858,7 @@ abstract class ModuleQuery extends ModelCriteria * * @return \Thelia\Model\ProfileModuleQuery A secondary query class using the current class as primary query */ - public function useProfileModuleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + public function useProfileModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinProfileModule($relationAlias, $joinType) diff --git a/core/lib/Thelia/Model/Base/Newsletter.php b/core/lib/Thelia/Model/Base/Newsletter.php index 5282045d3..ff7afb159 100644 --- a/core/lib/Thelia/Model/Base/Newsletter.php +++ b/core/lib/Thelia/Model/Base/Newsletter.php @@ -2,7 +2,6 @@ namespace Thelia\Model\Base; -use \DateTime; use \Exception; use \PDO; use Propel\Runtime\Propel; @@ -15,8 +14,6 @@ use Propel\Runtime\Exception\BadMethodCallException; use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Map\TableMap; use Propel\Runtime\Parser\AbstractParser; -use Propel\Runtime\Util\PropelDateTime; -use Thelia\Model\Newsletter as ChildNewsletter; use Thelia\Model\NewsletterQuery as ChildNewsletterQuery; use Thelia\Model\Map\NewsletterTableMap; @@ -78,24 +75,6 @@ abstract class Newsletter implements ActiveRecordInterface */ protected $lastname; - /** - * The value for the locale field. - * @var string - */ - protected $locale; - - /** - * The value for the created_at field. - * @var string - */ - protected $created_at; - - /** - * The value for the updated_at field. - * @var string - */ - protected $updated_at; - /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -406,57 +385,6 @@ abstract class Newsletter implements ActiveRecordInterface return $this->lastname; } - /** - * Get the [locale] column value. - * - * @return string - */ - public function getLocale() - { - - return $this->locale; - } - - /** - * Get the [optionally formatted] temporal [created_at] column value. - * - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. - * - * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 - * - * @throws PropelException - if unable to parse/validate the date/time value. - */ - public function getCreatedAt($format = NULL) - { - if ($format === null) { - return $this->created_at; - } else { - return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; - } - } - - /** - * Get the [optionally formatted] temporal [updated_at] column value. - * - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the raw \DateTime object will be returned. - * - * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 - * - * @throws PropelException - if unable to parse/validate the date/time value. - */ - public function getUpdatedAt($format = NULL) - { - if ($format === null) { - return $this->updated_at; - } else { - return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; - } - } - /** * Set the value of [id] column. * @@ -541,69 +469,6 @@ abstract class Newsletter implements ActiveRecordInterface return $this; } // setLastname() - /** - * Set the value of [locale] column. - * - * @param string $v new value - * @return \Thelia\Model\Newsletter The current object (for fluent API support) - */ - public function setLocale($v) - { - if ($v !== null) { - $v = (string) $v; - } - - if ($this->locale !== $v) { - $this->locale = $v; - $this->modifiedColumns[] = NewsletterTableMap::LOCALE; - } - - - return $this; - } // setLocale() - - /** - * Sets the value of [created_at] column to a normalized version of the date/time value specified. - * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Newsletter The current object (for fluent API support) - */ - public function setCreatedAt($v) - { - $dt = PropelDateTime::newInstance($v, null, '\DateTime'); - if ($this->created_at !== null || $dt !== null) { - if ($dt !== $this->created_at) { - $this->created_at = $dt; - $this->modifiedColumns[] = NewsletterTableMap::CREATED_AT; - } - } // if either are not null - - - return $this; - } // setCreatedAt() - - /** - * Sets the value of [updated_at] column to a normalized version of the date/time value specified. - * - * @param mixed $v string, integer (timestamp), or \DateTime value. - * Empty strings are treated as NULL. - * @return \Thelia\Model\Newsletter The current object (for fluent API support) - */ - public function setUpdatedAt($v) - { - $dt = PropelDateTime::newInstance($v, null, '\DateTime'); - if ($this->updated_at !== null || $dt !== null) { - if ($dt !== $this->updated_at) { - $this->updated_at = $dt; - $this->modifiedColumns[] = NewsletterTableMap::UPDATED_AT; - } - } // if either are not null - - - return $this; - } // setUpdatedAt() - /** * Indicates whether the columns in this object are only set to default values. * @@ -652,21 +517,6 @@ abstract class Newsletter implements ActiveRecordInterface $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : NewsletterTableMap::translateFieldName('Lastname', TableMap::TYPE_PHPNAME, $indexType)]; $this->lastname = (null !== $col) ? (string) $col : null; - - $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : NewsletterTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)]; - $this->locale = (null !== $col) ? (string) $col : null; - - $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : NewsletterTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; - if ($col === '0000-00-00 00:00:00') { - $col = null; - } - $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; - - $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : NewsletterTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; - if ($col === '0000-00-00 00:00:00') { - $col = null; - } - $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->resetModified(); $this->setNew(false); @@ -675,7 +525,7 @@ abstract class Newsletter implements ActiveRecordInterface $this->ensureConsistency(); } - return $startcol + 7; // 7 = NewsletterTableMap::NUM_HYDRATE_COLUMNS. + return $startcol + 4; // 4 = NewsletterTableMap::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating \Thelia\Model\Newsletter object", 0, $e); @@ -806,19 +656,8 @@ abstract class Newsletter implements ActiveRecordInterface $ret = $this->preSave($con); if ($isInsert) { $ret = $ret && $this->preInsert($con); - // timestampable behavior - if (!$this->isColumnModified(NewsletterTableMap::CREATED_AT)) { - $this->setCreatedAt(time()); - } - if (!$this->isColumnModified(NewsletterTableMap::UPDATED_AT)) { - $this->setUpdatedAt(time()); - } } else { $ret = $ret && $this->preUpdate($con); - // timestampable behavior - if ($this->isModified() && !$this->isColumnModified(NewsletterTableMap::UPDATED_AT)) { - $this->setUpdatedAt(time()); - } } if ($ret) { $affectedRows = $this->doSave($con); @@ -907,15 +746,6 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->isColumnModified(NewsletterTableMap::LASTNAME)) { $modifiedColumns[':p' . $index++] = 'LASTNAME'; } - if ($this->isColumnModified(NewsletterTableMap::LOCALE)) { - $modifiedColumns[':p' . $index++] = 'LOCALE'; - } - if ($this->isColumnModified(NewsletterTableMap::CREATED_AT)) { - $modifiedColumns[':p' . $index++] = 'CREATED_AT'; - } - if ($this->isColumnModified(NewsletterTableMap::UPDATED_AT)) { - $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; - } $sql = sprintf( 'INSERT INTO newsletter (%s) VALUES (%s)', @@ -939,15 +769,6 @@ abstract class Newsletter implements ActiveRecordInterface case 'LASTNAME': $stmt->bindValue($identifier, $this->lastname, PDO::PARAM_STR); break; - case 'LOCALE': - $stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR); - break; - case 'CREATED_AT': - $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); - break; - case 'UPDATED_AT': - $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); - break; } } $stmt->execute(); @@ -1022,15 +843,6 @@ abstract class Newsletter implements ActiveRecordInterface case 3: return $this->getLastname(); break; - case 4: - return $this->getLocale(); - break; - case 5: - return $this->getCreatedAt(); - break; - case 6: - return $this->getUpdatedAt(); - break; default: return null; break; @@ -1063,9 +875,6 @@ abstract class Newsletter implements ActiveRecordInterface $keys[1] => $this->getEmail(), $keys[2] => $this->getFirstname(), $keys[3] => $this->getLastname(), - $keys[4] => $this->getLocale(), - $keys[5] => $this->getCreatedAt(), - $keys[6] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1117,15 +926,6 @@ abstract class Newsletter implements ActiveRecordInterface case 3: $this->setLastname($value); break; - case 4: - $this->setLocale($value); - break; - case 5: - $this->setCreatedAt($value); - break; - case 6: - $this->setUpdatedAt($value); - break; } // switch() } @@ -1154,9 +954,6 @@ abstract class Newsletter implements ActiveRecordInterface if (array_key_exists($keys[1], $arr)) $this->setEmail($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setFirstname($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setLastname($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setLocale($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); } /** @@ -1172,9 +969,6 @@ abstract class Newsletter implements ActiveRecordInterface if ($this->isColumnModified(NewsletterTableMap::EMAIL)) $criteria->add(NewsletterTableMap::EMAIL, $this->email); if ($this->isColumnModified(NewsletterTableMap::FIRSTNAME)) $criteria->add(NewsletterTableMap::FIRSTNAME, $this->firstname); if ($this->isColumnModified(NewsletterTableMap::LASTNAME)) $criteria->add(NewsletterTableMap::LASTNAME, $this->lastname); - if ($this->isColumnModified(NewsletterTableMap::LOCALE)) $criteria->add(NewsletterTableMap::LOCALE, $this->locale); - if ($this->isColumnModified(NewsletterTableMap::CREATED_AT)) $criteria->add(NewsletterTableMap::CREATED_AT, $this->created_at); - if ($this->isColumnModified(NewsletterTableMap::UPDATED_AT)) $criteria->add(NewsletterTableMap::UPDATED_AT, $this->updated_at); return $criteria; } @@ -1241,9 +1035,6 @@ abstract class Newsletter implements ActiveRecordInterface $copyObj->setEmail($this->getEmail()); $copyObj->setFirstname($this->getFirstname()); $copyObj->setLastname($this->getLastname()); - $copyObj->setLocale($this->getLocale()); - $copyObj->setCreatedAt($this->getCreatedAt()); - $copyObj->setUpdatedAt($this->getUpdatedAt()); if ($makeNew) { $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value @@ -1281,9 +1072,6 @@ abstract class Newsletter implements ActiveRecordInterface $this->email = null; $this->firstname = null; $this->lastname = null; - $this->locale = null; - $this->created_at = null; - $this->updated_at = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); @@ -1317,20 +1105,6 @@ abstract class Newsletter implements ActiveRecordInterface return (string) $this->exportTo(NewsletterTableMap::DEFAULT_STRING_FORMAT); } - // timestampable behavior - - /** - * Mark the current object so that the update date doesn't get updated during next save - * - * @return ChildNewsletter The current object (for fluent API support) - */ - public function keepUpdateDateUnchanged() - { - $this->modifiedColumns[] = NewsletterTableMap::UPDATED_AT; - - return $this; - } - /** * Code to be run before persisting the object * @param ConnectionInterface $con diff --git a/core/lib/Thelia/Model/Base/NewsletterQuery.php b/core/lib/Thelia/Model/Base/NewsletterQuery.php index ef9ac0a22..79474e629 100644 --- a/core/lib/Thelia/Model/Base/NewsletterQuery.php +++ b/core/lib/Thelia/Model/Base/NewsletterQuery.php @@ -22,17 +22,11 @@ use Thelia\Model\Map\NewsletterTableMap; * @method ChildNewsletterQuery orderByEmail($order = Criteria::ASC) Order by the email column * @method ChildNewsletterQuery orderByFirstname($order = Criteria::ASC) Order by the firstname column * @method ChildNewsletterQuery orderByLastname($order = Criteria::ASC) Order by the lastname column - * @method ChildNewsletterQuery orderByLocale($order = Criteria::ASC) Order by the locale column - * @method ChildNewsletterQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column - * @method ChildNewsletterQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * * @method ChildNewsletterQuery groupById() Group by the id column * @method ChildNewsletterQuery groupByEmail() Group by the email column * @method ChildNewsletterQuery groupByFirstname() Group by the firstname column * @method ChildNewsletterQuery groupByLastname() Group by the lastname column - * @method ChildNewsletterQuery groupByLocale() Group by the locale column - * @method ChildNewsletterQuery groupByCreatedAt() Group by the created_at column - * @method ChildNewsletterQuery groupByUpdatedAt() Group by the updated_at column * * @method ChildNewsletterQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method ChildNewsletterQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -45,17 +39,11 @@ use Thelia\Model\Map\NewsletterTableMap; * @method ChildNewsletter findOneByEmail(string $email) Return the first ChildNewsletter filtered by the email column * @method ChildNewsletter findOneByFirstname(string $firstname) Return the first ChildNewsletter filtered by the firstname column * @method ChildNewsletter findOneByLastname(string $lastname) Return the first ChildNewsletter filtered by the lastname column - * @method ChildNewsletter findOneByLocale(string $locale) Return the first ChildNewsletter filtered by the locale column - * @method ChildNewsletter findOneByCreatedAt(string $created_at) Return the first ChildNewsletter filtered by the created_at column - * @method ChildNewsletter findOneByUpdatedAt(string $updated_at) Return the first ChildNewsletter filtered by the updated_at column * * @method array findById(int $id) Return ChildNewsletter objects filtered by the id column * @method array findByEmail(string $email) Return ChildNewsletter objects filtered by the email column * @method array findByFirstname(string $firstname) Return ChildNewsletter objects filtered by the firstname column * @method array findByLastname(string $lastname) Return ChildNewsletter objects filtered by the lastname column - * @method array findByLocale(string $locale) Return ChildNewsletter objects filtered by the locale column - * @method array findByCreatedAt(string $created_at) Return ChildNewsletter objects filtered by the created_at column - * @method array findByUpdatedAt(string $updated_at) Return ChildNewsletter objects filtered by the updated_at column * */ abstract class NewsletterQuery extends ModelCriteria @@ -144,7 +132,7 @@ abstract class NewsletterQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT ID, EMAIL, FIRSTNAME, LASTNAME, LOCALE, CREATED_AT, UPDATED_AT FROM newsletter WHERE ID = :p0'; + $sql = 'SELECT ID, EMAIL, FIRSTNAME, LASTNAME FROM newsletter WHERE ID = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -361,121 +349,6 @@ abstract class NewsletterQuery extends ModelCriteria return $this->addUsingAlias(NewsletterTableMap::LASTNAME, $lastname, $comparison); } - /** - * Filter the query on the locale column - * - * Example usage: - * - * $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue' - * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' - * - * - * @param string $locale The value to use as filter. - * Accepts wildcards (* and % trigger a LIKE) - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function filterByLocale($locale = null, $comparison = null) - { - if (null === $comparison) { - if (is_array($locale)) { - $comparison = Criteria::IN; - } elseif (preg_match('/[\%\*]/', $locale)) { - $locale = str_replace('*', '%', $locale); - $comparison = Criteria::LIKE; - } - } - - return $this->addUsingAlias(NewsletterTableMap::LOCALE, $locale, $comparison); - } - - /** - * Filter the query on the created_at column - * - * Example usage: - * - * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' - * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' - * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' - * - * - * @param mixed $createdAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function filterByCreatedAt($createdAt = null, $comparison = null) - { - if (is_array($createdAt)) { - $useMinMax = false; - if (isset($createdAt['min'])) { - $this->addUsingAlias(NewsletterTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($createdAt['max'])) { - $this->addUsingAlias(NewsletterTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - - return $this->addUsingAlias(NewsletterTableMap::CREATED_AT, $createdAt, $comparison); - } - - /** - * Filter the query on the updated_at column - * - * Example usage: - * - * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' - * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' - * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' - * - * - * @param mixed $updatedAt The value to use as filter. - * Values can be integers (unix timestamps), DateTime objects, or strings. - * Empty strings are treated as NULL. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function filterByUpdatedAt($updatedAt = null, $comparison = null) - { - if (is_array($updatedAt)) { - $useMinMax = false; - if (isset($updatedAt['min'])) { - $this->addUsingAlias(NewsletterTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($updatedAt['max'])) { - $this->addUsingAlias(NewsletterTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - - return $this->addUsingAlias(NewsletterTableMap::UPDATED_AT, $updatedAt, $comparison); - } - /** * Exclude object from result * @@ -567,70 +440,4 @@ abstract class NewsletterQuery extends ModelCriteria } } - // timestampable behavior - - /** - * Filter by the latest updated - * - * @param int $nbDays Maximum age of the latest update in days - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function recentlyUpdated($nbDays = 7) - { - return $this->addUsingAlias(NewsletterTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); - } - - /** - * Filter by the latest created - * - * @param int $nbDays Maximum age of in days - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function recentlyCreated($nbDays = 7) - { - return $this->addUsingAlias(NewsletterTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); - } - - /** - * Order by update date desc - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function lastUpdatedFirst() - { - return $this->addDescendingOrderByColumn(NewsletterTableMap::UPDATED_AT); - } - - /** - * Order by update date asc - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function firstUpdatedFirst() - { - return $this->addAscendingOrderByColumn(NewsletterTableMap::UPDATED_AT); - } - - /** - * Order by create date desc - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function lastCreatedFirst() - { - return $this->addDescendingOrderByColumn(NewsletterTableMap::CREATED_AT); - } - - /** - * Order by create date asc - * - * @return ChildNewsletterQuery The current query, for fluid interface - */ - public function firstCreatedFirst() - { - return $this->addAscendingOrderByColumn(NewsletterTableMap::CREATED_AT); - } - } // NewsletterQuery diff --git a/core/lib/Thelia/Model/Base/ProductPrice.php b/core/lib/Thelia/Model/Base/ProductPrice.php index dc177ad1b..363244e07 100644 --- a/core/lib/Thelia/Model/Base/ProductPrice.php +++ b/core/lib/Thelia/Model/Base/ProductPrice.php @@ -82,6 +82,13 @@ abstract class ProductPrice implements ActiveRecordInterface */ protected $promo_price; + /** + * The value for the from_default_currency field. + * Note: this column has a database default value of: false + * @var boolean + */ + protected $from_default_currency; + /** * The value for the created_at field. * @var string @@ -112,11 +119,24 @@ abstract class ProductPrice implements ActiveRecordInterface */ protected $alreadyInSave = false; + /** + * Applies default values to this object. + * This method should be called from the object's constructor (or + * equivalent initialization method). + * @see __construct() + */ + public function applyDefaultValues() + { + $this->from_default_currency = false; + } + /** * Initializes internal state of Thelia\Model\Base\ProductPrice object. + * @see applyDefaults() */ public function __construct() { + $this->applyDefaultValues(); } /** @@ -414,6 +434,17 @@ abstract class ProductPrice implements ActiveRecordInterface return $this->promo_price; } + /** + * Get the [from_default_currency] column value. + * + * @return boolean + */ + public function getFromDefaultCurrency() + { + + return $this->from_default_currency; + } + /** * Get the [optionally formatted] temporal [created_at] column value. * @@ -546,6 +577,35 @@ abstract class ProductPrice implements ActiveRecordInterface return $this; } // setPromoPrice() + /** + * Sets the value of the [from_default_currency] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \Thelia\Model\ProductPrice The current object (for fluent API support) + */ + public function setFromDefaultCurrency($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->from_default_currency !== $v) { + $this->from_default_currency = $v; + $this->modifiedColumns[] = ProductPriceTableMap::FROM_DEFAULT_CURRENCY; + } + + + return $this; + } // setFromDefaultCurrency() + /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. * @@ -598,6 +658,10 @@ abstract class ProductPrice implements ActiveRecordInterface */ public function hasOnlyDefaultValues() { + if ($this->from_default_currency !== false) { + return false; + } + // otherwise, everything was equal, so return TRUE return true; } // hasOnlyDefaultValues() @@ -637,13 +701,16 @@ abstract class ProductPrice implements ActiveRecordInterface $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProductPriceTableMap::translateFieldName('PromoPrice', TableMap::TYPE_PHPNAME, $indexType)]; $this->promo_price = (null !== $col) ? (double) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProductPriceTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProductPriceTableMap::translateFieldName('FromDefaultCurrency', TableMap::TYPE_PHPNAME, $indexType)]; + $this->from_default_currency = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductPriceTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductPriceTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductPriceTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } @@ -656,7 +723,7 @@ abstract class ProductPrice implements ActiveRecordInterface $this->ensureConsistency(); } - return $startcol + 6; // 6 = ProductPriceTableMap::NUM_HYDRATE_COLUMNS. + return $startcol + 7; // 7 = ProductPriceTableMap::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating \Thelia\Model\ProductPrice object", 0, $e); @@ -911,6 +978,9 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->isColumnModified(ProductPriceTableMap::PROMO_PRICE)) { $modifiedColumns[':p' . $index++] = 'PROMO_PRICE'; } + if ($this->isColumnModified(ProductPriceTableMap::FROM_DEFAULT_CURRENCY)) { + $modifiedColumns[':p' . $index++] = 'FROM_DEFAULT_CURRENCY'; + } if ($this->isColumnModified(ProductPriceTableMap::CREATED_AT)) { $modifiedColumns[':p' . $index++] = 'CREATED_AT'; } @@ -940,6 +1010,9 @@ abstract class ProductPrice implements ActiveRecordInterface case 'PROMO_PRICE': $stmt->bindValue($identifier, $this->promo_price, PDO::PARAM_STR); break; + case 'FROM_DEFAULT_CURRENCY': + $stmt->bindValue($identifier, (int) $this->from_default_currency, PDO::PARAM_INT); + break; case 'CREATED_AT': $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); break; @@ -1014,9 +1087,12 @@ abstract class ProductPrice implements ActiveRecordInterface return $this->getPromoPrice(); break; case 4: - return $this->getCreatedAt(); + return $this->getFromDefaultCurrency(); break; case 5: + return $this->getCreatedAt(); + break; + case 6: return $this->getUpdatedAt(); break; default: @@ -1052,8 +1128,9 @@ abstract class ProductPrice implements ActiveRecordInterface $keys[1] => $this->getCurrencyId(), $keys[2] => $this->getPrice(), $keys[3] => $this->getPromoPrice(), - $keys[4] => $this->getCreatedAt(), - $keys[5] => $this->getUpdatedAt(), + $keys[4] => $this->getFromDefaultCurrency(), + $keys[5] => $this->getCreatedAt(), + $keys[6] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1114,9 +1191,12 @@ abstract class ProductPrice implements ActiveRecordInterface $this->setPromoPrice($value); break; case 4: - $this->setCreatedAt($value); + $this->setFromDefaultCurrency($value); break; case 5: + $this->setCreatedAt($value); + break; + case 6: $this->setUpdatedAt($value); break; } // switch() @@ -1147,8 +1227,9 @@ abstract class ProductPrice implements ActiveRecordInterface if (array_key_exists($keys[1], $arr)) $this->setCurrencyId($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setPrice($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setPromoPrice($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]); + if (array_key_exists($keys[4], $arr)) $this->setFromDefaultCurrency($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); } /** @@ -1164,6 +1245,7 @@ abstract class ProductPrice implements ActiveRecordInterface if ($this->isColumnModified(ProductPriceTableMap::CURRENCY_ID)) $criteria->add(ProductPriceTableMap::CURRENCY_ID, $this->currency_id); if ($this->isColumnModified(ProductPriceTableMap::PRICE)) $criteria->add(ProductPriceTableMap::PRICE, $this->price); if ($this->isColumnModified(ProductPriceTableMap::PROMO_PRICE)) $criteria->add(ProductPriceTableMap::PROMO_PRICE, $this->promo_price); + if ($this->isColumnModified(ProductPriceTableMap::FROM_DEFAULT_CURRENCY)) $criteria->add(ProductPriceTableMap::FROM_DEFAULT_CURRENCY, $this->from_default_currency); if ($this->isColumnModified(ProductPriceTableMap::CREATED_AT)) $criteria->add(ProductPriceTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(ProductPriceTableMap::UPDATED_AT)) $criteria->add(ProductPriceTableMap::UPDATED_AT, $this->updated_at); @@ -1240,6 +1322,7 @@ abstract class ProductPrice implements ActiveRecordInterface $copyObj->setCurrencyId($this->getCurrencyId()); $copyObj->setPrice($this->getPrice()); $copyObj->setPromoPrice($this->getPromoPrice()); + $copyObj->setFromDefaultCurrency($this->getFromDefaultCurrency()); $copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setUpdatedAt($this->getUpdatedAt()); if ($makeNew) { @@ -1380,10 +1463,12 @@ abstract class ProductPrice implements ActiveRecordInterface $this->currency_id = null; $this->price = null; $this->promo_price = null; + $this->from_default_currency = null; $this->created_at = null; $this->updated_at = null; $this->alreadyInSave = false; $this->clearAllReferences(); + $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); diff --git a/core/lib/Thelia/Model/Base/ProductPriceQuery.php b/core/lib/Thelia/Model/Base/ProductPriceQuery.php index 9790d00ef..1ea364459 100644 --- a/core/lib/Thelia/Model/Base/ProductPriceQuery.php +++ b/core/lib/Thelia/Model/Base/ProductPriceQuery.php @@ -25,6 +25,7 @@ use Thelia\Model\Map\ProductPriceTableMap; * @method ChildProductPriceQuery orderByCurrencyId($order = Criteria::ASC) Order by the currency_id column * @method ChildProductPriceQuery orderByPrice($order = Criteria::ASC) Order by the price column * @method ChildProductPriceQuery orderByPromoPrice($order = Criteria::ASC) Order by the promo_price column + * @method ChildProductPriceQuery orderByFromDefaultCurrency($order = Criteria::ASC) Order by the from_default_currency column * @method ChildProductPriceQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildProductPriceQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * @@ -32,6 +33,7 @@ use Thelia\Model\Map\ProductPriceTableMap; * @method ChildProductPriceQuery groupByCurrencyId() Group by the currency_id column * @method ChildProductPriceQuery groupByPrice() Group by the price column * @method ChildProductPriceQuery groupByPromoPrice() Group by the promo_price column + * @method ChildProductPriceQuery groupByFromDefaultCurrency() Group by the from_default_currency column * @method ChildProductPriceQuery groupByCreatedAt() Group by the created_at column * @method ChildProductPriceQuery groupByUpdatedAt() Group by the updated_at column * @@ -54,6 +56,7 @@ use Thelia\Model\Map\ProductPriceTableMap; * @method ChildProductPrice findOneByCurrencyId(int $currency_id) Return the first ChildProductPrice filtered by the currency_id column * @method ChildProductPrice findOneByPrice(double $price) Return the first ChildProductPrice filtered by the price column * @method ChildProductPrice findOneByPromoPrice(double $promo_price) Return the first ChildProductPrice filtered by the promo_price column + * @method ChildProductPrice findOneByFromDefaultCurrency(boolean $from_default_currency) Return the first ChildProductPrice filtered by the from_default_currency column * @method ChildProductPrice findOneByCreatedAt(string $created_at) Return the first ChildProductPrice filtered by the created_at column * @method ChildProductPrice findOneByUpdatedAt(string $updated_at) Return the first ChildProductPrice filtered by the updated_at column * @@ -61,6 +64,7 @@ use Thelia\Model\Map\ProductPriceTableMap; * @method array findByCurrencyId(int $currency_id) Return ChildProductPrice objects filtered by the currency_id column * @method array findByPrice(double $price) Return ChildProductPrice objects filtered by the price column * @method array findByPromoPrice(double $promo_price) Return ChildProductPrice objects filtered by the promo_price column + * @method array findByFromDefaultCurrency(boolean $from_default_currency) Return ChildProductPrice objects filtered by the from_default_currency column * @method array findByCreatedAt(string $created_at) Return ChildProductPrice objects filtered by the created_at column * @method array findByUpdatedAt(string $updated_at) Return ChildProductPrice objects filtered by the updated_at column * @@ -151,7 +155,7 @@ abstract class ProductPriceQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT PRODUCT_SALE_ELEMENTS_ID, CURRENCY_ID, PRICE, PROMO_PRICE, CREATED_AT, UPDATED_AT FROM product_price WHERE PRODUCT_SALE_ELEMENTS_ID = :p0 AND CURRENCY_ID = :p1'; + $sql = 'SELECT PRODUCT_SALE_ELEMENTS_ID, CURRENCY_ID, PRICE, PROMO_PRICE, FROM_DEFAULT_CURRENCY, CREATED_AT, UPDATED_AT FROM product_price WHERE PRODUCT_SALE_ELEMENTS_ID = :p0 AND CURRENCY_ID = :p1'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); @@ -420,6 +424,33 @@ abstract class ProductPriceQuery extends ModelCriteria return $this->addUsingAlias(ProductPriceTableMap::PROMO_PRICE, $promoPrice, $comparison); } + /** + * Filter the query on the from_default_currency column + * + * Example usage: + * + * $query->filterByFromDefaultCurrency(true); // WHERE from_default_currency = true + * $query->filterByFromDefaultCurrency('yes'); // WHERE from_default_currency = true + * + * + * @param boolean|string $fromDefaultCurrency The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildProductPriceQuery The current query, for fluid interface + */ + public function filterByFromDefaultCurrency($fromDefaultCurrency = null, $comparison = null) + { + if (is_string($fromDefaultCurrency)) { + $from_default_currency = in_array(strtolower($fromDefaultCurrency), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(ProductPriceTableMap::FROM_DEFAULT_CURRENCY, $fromDefaultCurrency, $comparison); + } + /** * Filter the query on the created_at column * diff --git a/core/lib/Thelia/Model/Base/Profile.php b/core/lib/Thelia/Model/Base/Profile.php index 2f75899d2..f4796c58e 100644 --- a/core/lib/Thelia/Model/Base/Profile.php +++ b/core/lib/Thelia/Model/Base/Profile.php @@ -1944,7 +1944,10 @@ abstract class Profile implements ActiveRecordInterface $profileModulesToDelete = $this->getProfileModules(new Criteria(), $con)->diff($profileModules); - $this->profileModulesScheduledForDeletion = $profileModulesToDelete; + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->profileModulesScheduledForDeletion = clone $profileModulesToDelete; foreach ($profileModulesToDelete as $profileModuleRemoved) { $profileModuleRemoved->setProfile(null); diff --git a/core/lib/Thelia/Model/Base/ProfileModule.php b/core/lib/Thelia/Model/Base/ProfileModule.php index acd54b534..11523f35c 100644 --- a/core/lib/Thelia/Model/Base/ProfileModule.php +++ b/core/lib/Thelia/Model/Base/ProfileModule.php @@ -58,12 +58,6 @@ abstract class ProfileModule implements ActiveRecordInterface */ protected $virtualColumns = array(); - /** - * The value for the id field. - * @var int - */ - protected $id; - /** * The value for the profile_id field. * @var int @@ -384,17 +378,6 @@ abstract class ProfileModule implements ActiveRecordInterface return array_keys(get_object_vars($this)); } - /** - * Get the [id] column value. - * - * @return int - */ - public function getId() - { - - return $this->id; - } - /** * Get the [profile_id] column value. * @@ -468,27 +451,6 @@ abstract class ProfileModule implements ActiveRecordInterface } } - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return \Thelia\Model\ProfileModule The current object (for fluent API support) - */ - public function setId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = ProfileModuleTableMap::ID; - } - - - return $this; - } // setId() - /** * Set the value of [profile_id] column. * @@ -643,25 +605,22 @@ abstract class ProfileModule implements ActiveRecordInterface try { - $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileModuleTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; - $this->id = (null !== $col) ? (int) $col : null; - - $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProfileModuleTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileModuleTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; $this->profile_id = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProfileModuleTableMap::translateFieldName('ModuleId', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProfileModuleTableMap::translateFieldName('ModuleId', TableMap::TYPE_PHPNAME, $indexType)]; $this->module_id = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProfileModuleTableMap::translateFieldName('Access', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProfileModuleTableMap::translateFieldName('Access', TableMap::TYPE_PHPNAME, $indexType)]; $this->access = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProfileModuleTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProfileModuleTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProfileModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProfileModuleTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } @@ -674,7 +633,7 @@ abstract class ProfileModule implements ActiveRecordInterface $this->ensureConsistency(); } - return $startcol + 6; // 6 = ProfileModuleTableMap::NUM_HYDRATE_COLUMNS. + return $startcol + 5; // 5 = ProfileModuleTableMap::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating \Thelia\Model\ProfileModule object", 0, $e); @@ -915,15 +874,8 @@ abstract class ProfileModule implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProfileModuleTableMap::ID; - if (null !== $this->id) { - throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProfileModuleTableMap::ID . ')'); - } // check the columns in natural order for more readable SQL queries - if ($this->isColumnModified(ProfileModuleTableMap::ID)) { - $modifiedColumns[':p' . $index++] = 'ID'; - } if ($this->isColumnModified(ProfileModuleTableMap::PROFILE_ID)) { $modifiedColumns[':p' . $index++] = 'PROFILE_ID'; } @@ -950,9 +902,6 @@ abstract class ProfileModule implements ActiveRecordInterface $stmt = $con->prepare($sql); foreach ($modifiedColumns as $identifier => $columnName) { switch ($columnName) { - case 'ID': - $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); - break; case 'PROFILE_ID': $stmt->bindValue($identifier, $this->profile_id, PDO::PARAM_INT); break; @@ -976,13 +925,6 @@ abstract class ProfileModule implements ActiveRecordInterface throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); } - try { - $pk = $con->lastInsertId(); - } catch (Exception $e) { - throw new PropelException('Unable to get autoincrement id.', 0, $e); - } - $this->setId($pk); - $this->setNew(false); } @@ -1031,21 +973,18 @@ abstract class ProfileModule implements ActiveRecordInterface { switch ($pos) { case 0: - return $this->getId(); - break; - case 1: return $this->getProfileId(); break; - case 2: + case 1: return $this->getModuleId(); break; - case 3: + case 2: return $this->getAccess(); break; - case 4: + case 3: return $this->getCreatedAt(); break; - case 5: + case 4: return $this->getUpdatedAt(); break; default: @@ -1071,18 +1010,17 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { - if (isset($alreadyDumpedObjects['ProfileModule'][$this->getPrimaryKey()])) { + if (isset($alreadyDumpedObjects['ProfileModule'][serialize($this->getPrimaryKey())])) { return '*RECURSION*'; } - $alreadyDumpedObjects['ProfileModule'][$this->getPrimaryKey()] = true; + $alreadyDumpedObjects['ProfileModule'][serialize($this->getPrimaryKey())] = true; $keys = ProfileModuleTableMap::getFieldNames($keyType); $result = array( - $keys[0] => $this->getId(), - $keys[1] => $this->getProfileId(), - $keys[2] => $this->getModuleId(), - $keys[3] => $this->getAccess(), - $keys[4] => $this->getCreatedAt(), - $keys[5] => $this->getUpdatedAt(), + $keys[0] => $this->getProfileId(), + $keys[1] => $this->getModuleId(), + $keys[2] => $this->getAccess(), + $keys[3] => $this->getCreatedAt(), + $keys[4] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1131,21 +1069,18 @@ abstract class ProfileModule implements ActiveRecordInterface { switch ($pos) { case 0: - $this->setId($value); - break; - case 1: $this->setProfileId($value); break; - case 2: + case 1: $this->setModuleId($value); break; - case 3: + case 2: $this->setAccess($value); break; - case 4: + case 3: $this->setCreatedAt($value); break; - case 5: + case 4: $this->setUpdatedAt($value); break; } // switch() @@ -1172,12 +1107,11 @@ abstract class ProfileModule implements ActiveRecordInterface { $keys = ProfileModuleTableMap::getFieldNames($keyType); - if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setProfileId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setModuleId($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setAccess($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]); + if (array_key_exists($keys[0], $arr)) $this->setProfileId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setModuleId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setAccess($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]); } /** @@ -1189,7 +1123,6 @@ abstract class ProfileModule implements ActiveRecordInterface { $criteria = new Criteria(ProfileModuleTableMap::DATABASE_NAME); - if ($this->isColumnModified(ProfileModuleTableMap::ID)) $criteria->add(ProfileModuleTableMap::ID, $this->id); if ($this->isColumnModified(ProfileModuleTableMap::PROFILE_ID)) $criteria->add(ProfileModuleTableMap::PROFILE_ID, $this->profile_id); if ($this->isColumnModified(ProfileModuleTableMap::MODULE_ID)) $criteria->add(ProfileModuleTableMap::MODULE_ID, $this->module_id); if ($this->isColumnModified(ProfileModuleTableMap::ACCESS)) $criteria->add(ProfileModuleTableMap::ACCESS, $this->access); @@ -1210,29 +1143,36 @@ abstract class ProfileModule implements ActiveRecordInterface public function buildPkeyCriteria() { $criteria = new Criteria(ProfileModuleTableMap::DATABASE_NAME); - $criteria->add(ProfileModuleTableMap::ID, $this->id); + $criteria->add(ProfileModuleTableMap::PROFILE_ID, $this->profile_id); + $criteria->add(ProfileModuleTableMap::MODULE_ID, $this->module_id); return $criteria; } /** - * Returns the primary key for this object (row). - * @return int + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array */ public function getPrimaryKey() { - return $this->getId(); + $pks = array(); + $pks[0] = $this->getProfileId(); + $pks[1] = $this->getModuleId(); + + return $pks; } /** - * Generic method to set the primary key (id column). + * Set the [composite] primary key. * - * @param int $key Primary key. + * @param array $keys The elements of the composite key (order must match the order in XML file). * @return void */ - public function setPrimaryKey($key) + public function setPrimaryKey($keys) { - $this->setId($key); + $this->setProfileId($keys[0]); + $this->setModuleId($keys[1]); } /** @@ -1242,7 +1182,7 @@ abstract class ProfileModule implements ActiveRecordInterface public function isPrimaryKeyNull() { - return null === $this->getId(); + return (null === $this->getProfileId()) && (null === $this->getModuleId()); } /** @@ -1265,7 +1205,6 @@ abstract class ProfileModule implements ActiveRecordInterface $copyObj->setUpdatedAt($this->getUpdatedAt()); if ($makeNew) { $copyObj->setNew(true); - $copyObj->setId(NULL); // this is a auto-increment column, so set to default value } } @@ -1398,7 +1337,6 @@ abstract class ProfileModule implements ActiveRecordInterface */ public function clear() { - $this->id = null; $this->profile_id = null; $this->module_id = null; $this->access = null; diff --git a/core/lib/Thelia/Model/Base/ProfileModuleQuery.php b/core/lib/Thelia/Model/Base/ProfileModuleQuery.php index f375b969b..6622eae9e 100644 --- a/core/lib/Thelia/Model/Base/ProfileModuleQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileModuleQuery.php @@ -21,14 +21,12 @@ use Thelia\Model\Map\ProfileModuleTableMap; * * * - * @method ChildProfileModuleQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildProfileModuleQuery orderByProfileId($order = Criteria::ASC) Order by the profile_id column * @method ChildProfileModuleQuery orderByModuleId($order = Criteria::ASC) Order by the module_id column * @method ChildProfileModuleQuery orderByAccess($order = Criteria::ASC) Order by the access column * @method ChildProfileModuleQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildProfileModuleQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * - * @method ChildProfileModuleQuery groupById() Group by the id column * @method ChildProfileModuleQuery groupByProfileId() Group by the profile_id column * @method ChildProfileModuleQuery groupByModuleId() Group by the module_id column * @method ChildProfileModuleQuery groupByAccess() Group by the access column @@ -50,14 +48,12 @@ use Thelia\Model\Map\ProfileModuleTableMap; * @method ChildProfileModule findOne(ConnectionInterface $con = null) Return the first ChildProfileModule matching the query * @method ChildProfileModule findOneOrCreate(ConnectionInterface $con = null) Return the first ChildProfileModule matching the query, or a new ChildProfileModule object populated from the query conditions when no match is found * - * @method ChildProfileModule findOneById(int $id) Return the first ChildProfileModule filtered by the id column * @method ChildProfileModule findOneByProfileId(int $profile_id) Return the first ChildProfileModule filtered by the profile_id column * @method ChildProfileModule findOneByModuleId(int $module_id) Return the first ChildProfileModule filtered by the module_id column * @method ChildProfileModule findOneByAccess(int $access) Return the first ChildProfileModule filtered by the access column * @method ChildProfileModule findOneByCreatedAt(string $created_at) Return the first ChildProfileModule filtered by the created_at column * @method ChildProfileModule findOneByUpdatedAt(string $updated_at) Return the first ChildProfileModule filtered by the updated_at column * - * @method array findById(int $id) Return ChildProfileModule objects filtered by the id column * @method array findByProfileId(int $profile_id) Return ChildProfileModule objects filtered by the profile_id column * @method array findByModuleId(int $module_id) Return ChildProfileModule objects filtered by the module_id column * @method array findByAccess(int $access) Return ChildProfileModule objects filtered by the access column @@ -110,10 +106,10 @@ abstract class ProfileModuleQuery extends ModelCriteria * Go fast if the query is untouched. * * - * $obj = $c->findPk(12, $con); + * $obj = $c->findPk(array(12, 34), $con); * * - * @param mixed $key Primary key to use for the query + * @param array[$profile_id, $module_id] $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProfileModule|array|mixed the result, formatted by the current formatter @@ -123,7 +119,7 @@ abstract class ProfileModuleQuery extends ModelCriteria if ($key === null) { return null; } - if ((null !== ($obj = ProfileModuleTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + if ((null !== ($obj = ProfileModuleTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { // the object is already in the instance pool return $obj; } @@ -151,10 +147,11 @@ abstract class ProfileModuleQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT ID, PROFILE_ID, MODULE_ID, ACCESS, CREATED_AT, UPDATED_AT FROM profile_module WHERE ID = :p0'; + $sql = 'SELECT PROFILE_ID, MODULE_ID, ACCESS, CREATED_AT, UPDATED_AT FROM profile_module WHERE PROFILE_ID = :p0 AND MODULE_ID = :p1'; try { $stmt = $con->prepare($sql); - $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT); $stmt->execute(); } catch (Exception $e) { Propel::log($e->getMessage(), Propel::LOG_ERR); @@ -164,7 +161,7 @@ abstract class ProfileModuleQuery extends ModelCriteria if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { $obj = new ChildProfileModule(); $obj->hydrate($row); - ProfileModuleTableMap::addInstanceToPool($obj, (string) $key); + ProfileModuleTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); } $stmt->closeCursor(); @@ -193,7 +190,7 @@ abstract class ProfileModuleQuery extends ModelCriteria /** * Find objects by primary key * - * $objs = $c->findPks(array(12, 56, 832), $con); + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); * * @param array $keys Primary keys to use for the query * @param ConnectionInterface $con an optional connection object @@ -223,8 +220,10 @@ abstract class ProfileModuleQuery extends ModelCriteria */ public function filterByPrimaryKey($key) { + $this->addUsingAlias(ProfileModuleTableMap::PROFILE_ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(ProfileModuleTableMap::MODULE_ID, $key[1], Criteria::EQUAL); - return $this->addUsingAlias(ProfileModuleTableMap::ID, $key, Criteria::EQUAL); + return $this; } /** @@ -236,49 +235,17 @@ abstract class ProfileModuleQuery extends ModelCriteria */ public function filterByPrimaryKeys($keys) { - - return $this->addUsingAlias(ProfileModuleTableMap::ID, $keys, Criteria::IN); - } - - /** - * Filter the query on the id column - * - * Example usage: - * - * $query->filterById(1234); // WHERE id = 1234 - * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) - * $query->filterById(array('min' => 12)); // WHERE id > 12 - * - * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return ChildProfileModuleQuery The current query, for fluid interface - */ - public function filterById($id = null, $comparison = null) - { - if (is_array($id)) { - $useMinMax = false; - if (isset($id['min'])) { - $this->addUsingAlias(ProfileModuleTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($id['max'])) { - $this->addUsingAlias(ProfileModuleTableMap::ID, $id['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(ProfileModuleTableMap::PROFILE_ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(ProfileModuleTableMap::MODULE_ID, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); } - return $this->addUsingAlias(ProfileModuleTableMap::ID, $id, $comparison); + return $this; } /** @@ -602,7 +569,7 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @return ChildProfileModuleQuery The current query, for fluid interface */ - public function joinModule($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + public function joinModule($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('Module'); @@ -637,7 +604,7 @@ abstract class ProfileModuleQuery extends ModelCriteria * * @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query */ - public function useModuleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinModule($relationAlias, $joinType) @@ -654,7 +621,9 @@ abstract class ProfileModuleQuery extends ModelCriteria public function prune($profileModule = null) { if ($profileModule) { - $this->addUsingAlias(ProfileModuleTableMap::ID, $profileModule->getId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond0', $this->getAliasedColName(ProfileModuleTableMap::PROFILE_ID), $profileModule->getProfileId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(ProfileModuleTableMap::MODULE_ID), $profileModule->getModuleId(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; diff --git a/core/lib/Thelia/Model/Base/ProfileResource.php b/core/lib/Thelia/Model/Base/ProfileResource.php index bd62a76af..e4efc6f6a 100644 --- a/core/lib/Thelia/Model/Base/ProfileResource.php +++ b/core/lib/Thelia/Model/Base/ProfileResource.php @@ -58,12 +58,6 @@ abstract class ProfileResource implements ActiveRecordInterface */ protected $virtualColumns = array(); - /** - * The value for the id field. - * @var int - */ - protected $id; - /** * The value for the profile_id field. * @var int @@ -384,17 +378,6 @@ abstract class ProfileResource implements ActiveRecordInterface return array_keys(get_object_vars($this)); } - /** - * Get the [id] column value. - * - * @return int - */ - public function getId() - { - - return $this->id; - } - /** * Get the [profile_id] column value. * @@ -468,27 +451,6 @@ abstract class ProfileResource implements ActiveRecordInterface } } - /** - * Set the value of [id] column. - * - * @param int $v new value - * @return \Thelia\Model\ProfileResource The current object (for fluent API support) - */ - public function setId($v) - { - if ($v !== null) { - $v = (int) $v; - } - - if ($this->id !== $v) { - $this->id = $v; - $this->modifiedColumns[] = ProfileResourceTableMap::ID; - } - - - return $this; - } // setId() - /** * Set the value of [profile_id] column. * @@ -643,25 +605,22 @@ abstract class ProfileResource implements ActiveRecordInterface try { - $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileResourceTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; - $this->id = (null !== $col) ? (int) $col : null; - - $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProfileResourceTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ProfileResourceTableMap::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)]; $this->profile_id = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProfileResourceTableMap::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProfileResourceTableMap::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)]; $this->resource_id = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProfileResourceTableMap::translateFieldName('Access', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProfileResourceTableMap::translateFieldName('Access', TableMap::TYPE_PHPNAME, $indexType)]; $this->access = (null !== $col) ? (int) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProfileResourceTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProfileResourceTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProfileResourceTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProfileResourceTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { $col = null; } @@ -674,7 +633,7 @@ abstract class ProfileResource implements ActiveRecordInterface $this->ensureConsistency(); } - return $startcol + 6; // 6 = ProfileResourceTableMap::NUM_HYDRATE_COLUMNS. + return $startcol + 5; // 5 = ProfileResourceTableMap::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating \Thelia\Model\ProfileResource object", 0, $e); @@ -915,15 +874,8 @@ abstract class ProfileResource implements ActiveRecordInterface $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = ProfileResourceTableMap::ID; - if (null !== $this->id) { - throw new PropelException('Cannot insert a value for auto-increment primary key (' . ProfileResourceTableMap::ID . ')'); - } // check the columns in natural order for more readable SQL queries - if ($this->isColumnModified(ProfileResourceTableMap::ID)) { - $modifiedColumns[':p' . $index++] = 'ID'; - } if ($this->isColumnModified(ProfileResourceTableMap::PROFILE_ID)) { $modifiedColumns[':p' . $index++] = 'PROFILE_ID'; } @@ -950,9 +902,6 @@ abstract class ProfileResource implements ActiveRecordInterface $stmt = $con->prepare($sql); foreach ($modifiedColumns as $identifier => $columnName) { switch ($columnName) { - case 'ID': - $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); - break; case 'PROFILE_ID': $stmt->bindValue($identifier, $this->profile_id, PDO::PARAM_INT); break; @@ -976,13 +925,6 @@ abstract class ProfileResource implements ActiveRecordInterface throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); } - try { - $pk = $con->lastInsertId(); - } catch (Exception $e) { - throw new PropelException('Unable to get autoincrement id.', 0, $e); - } - $this->setId($pk); - $this->setNew(false); } @@ -1031,21 +973,18 @@ abstract class ProfileResource implements ActiveRecordInterface { switch ($pos) { case 0: - return $this->getId(); - break; - case 1: return $this->getProfileId(); break; - case 2: + case 1: return $this->getResourceId(); break; - case 3: + case 2: return $this->getAccess(); break; - case 4: + case 3: return $this->getCreatedAt(); break; - case 5: + case 4: return $this->getUpdatedAt(); break; default: @@ -1077,12 +1016,11 @@ abstract class ProfileResource implements ActiveRecordInterface $alreadyDumpedObjects['ProfileResource'][serialize($this->getPrimaryKey())] = true; $keys = ProfileResourceTableMap::getFieldNames($keyType); $result = array( - $keys[0] => $this->getId(), - $keys[1] => $this->getProfileId(), - $keys[2] => $this->getResourceId(), - $keys[3] => $this->getAccess(), - $keys[4] => $this->getCreatedAt(), - $keys[5] => $this->getUpdatedAt(), + $keys[0] => $this->getProfileId(), + $keys[1] => $this->getResourceId(), + $keys[2] => $this->getAccess(), + $keys[3] => $this->getCreatedAt(), + $keys[4] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1131,21 +1069,18 @@ abstract class ProfileResource implements ActiveRecordInterface { switch ($pos) { case 0: - $this->setId($value); - break; - case 1: $this->setProfileId($value); break; - case 2: + case 1: $this->setResourceId($value); break; - case 3: + case 2: $this->setAccess($value); break; - case 4: + case 3: $this->setCreatedAt($value); break; - case 5: + case 4: $this->setUpdatedAt($value); break; } // switch() @@ -1172,12 +1107,11 @@ abstract class ProfileResource implements ActiveRecordInterface { $keys = ProfileResourceTableMap::getFieldNames($keyType); - if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setProfileId($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setResourceId($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setAccess($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]); + if (array_key_exists($keys[0], $arr)) $this->setProfileId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setResourceId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setAccess($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]); } /** @@ -1189,7 +1123,6 @@ abstract class ProfileResource implements ActiveRecordInterface { $criteria = new Criteria(ProfileResourceTableMap::DATABASE_NAME); - if ($this->isColumnModified(ProfileResourceTableMap::ID)) $criteria->add(ProfileResourceTableMap::ID, $this->id); if ($this->isColumnModified(ProfileResourceTableMap::PROFILE_ID)) $criteria->add(ProfileResourceTableMap::PROFILE_ID, $this->profile_id); if ($this->isColumnModified(ProfileResourceTableMap::RESOURCE_ID)) $criteria->add(ProfileResourceTableMap::RESOURCE_ID, $this->resource_id); if ($this->isColumnModified(ProfileResourceTableMap::ACCESS)) $criteria->add(ProfileResourceTableMap::ACCESS, $this->access); @@ -1210,7 +1143,6 @@ abstract class ProfileResource implements ActiveRecordInterface public function buildPkeyCriteria() { $criteria = new Criteria(ProfileResourceTableMap::DATABASE_NAME); - $criteria->add(ProfileResourceTableMap::ID, $this->id); $criteria->add(ProfileResourceTableMap::PROFILE_ID, $this->profile_id); $criteria->add(ProfileResourceTableMap::RESOURCE_ID, $this->resource_id); @@ -1225,9 +1157,8 @@ abstract class ProfileResource implements ActiveRecordInterface public function getPrimaryKey() { $pks = array(); - $pks[0] = $this->getId(); - $pks[1] = $this->getProfileId(); - $pks[2] = $this->getResourceId(); + $pks[0] = $this->getProfileId(); + $pks[1] = $this->getResourceId(); return $pks; } @@ -1240,9 +1171,8 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function setPrimaryKey($keys) { - $this->setId($keys[0]); - $this->setProfileId($keys[1]); - $this->setResourceId($keys[2]); + $this->setProfileId($keys[0]); + $this->setResourceId($keys[1]); } /** @@ -1252,7 +1182,7 @@ abstract class ProfileResource implements ActiveRecordInterface public function isPrimaryKeyNull() { - return (null === $this->getId()) && (null === $this->getProfileId()) && (null === $this->getResourceId()); + return (null === $this->getProfileId()) && (null === $this->getResourceId()); } /** @@ -1275,7 +1205,6 @@ abstract class ProfileResource implements ActiveRecordInterface $copyObj->setUpdatedAt($this->getUpdatedAt()); if ($makeNew) { $copyObj->setNew(true); - $copyObj->setId(NULL); // this is a auto-increment column, so set to default value } } @@ -1408,7 +1337,6 @@ abstract class ProfileResource implements ActiveRecordInterface */ public function clear() { - $this->id = null; $this->profile_id = null; $this->resource_id = null; $this->access = null; diff --git a/core/lib/Thelia/Model/Base/ProfileResourceQuery.php b/core/lib/Thelia/Model/Base/ProfileResourceQuery.php index ba4fca82d..c33ba7daa 100644 --- a/core/lib/Thelia/Model/Base/ProfileResourceQuery.php +++ b/core/lib/Thelia/Model/Base/ProfileResourceQuery.php @@ -21,14 +21,12 @@ use Thelia\Model\Map\ProfileResourceTableMap; * * * - * @method ChildProfileResourceQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildProfileResourceQuery orderByProfileId($order = Criteria::ASC) Order by the profile_id column * @method ChildProfileResourceQuery orderByResourceId($order = Criteria::ASC) Order by the resource_id column * @method ChildProfileResourceQuery orderByAccess($order = Criteria::ASC) Order by the access column * @method ChildProfileResourceQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildProfileResourceQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * - * @method ChildProfileResourceQuery groupById() Group by the id column * @method ChildProfileResourceQuery groupByProfileId() Group by the profile_id column * @method ChildProfileResourceQuery groupByResourceId() Group by the resource_id column * @method ChildProfileResourceQuery groupByAccess() Group by the access column @@ -50,14 +48,12 @@ use Thelia\Model\Map\ProfileResourceTableMap; * @method ChildProfileResource findOne(ConnectionInterface $con = null) Return the first ChildProfileResource matching the query * @method ChildProfileResource findOneOrCreate(ConnectionInterface $con = null) Return the first ChildProfileResource matching the query, or a new ChildProfileResource object populated from the query conditions when no match is found * - * @method ChildProfileResource findOneById(int $id) Return the first ChildProfileResource filtered by the id column * @method ChildProfileResource findOneByProfileId(int $profile_id) Return the first ChildProfileResource filtered by the profile_id column * @method ChildProfileResource findOneByResourceId(int $resource_id) Return the first ChildProfileResource filtered by the resource_id column * @method ChildProfileResource findOneByAccess(int $access) Return the first ChildProfileResource filtered by the access column * @method ChildProfileResource findOneByCreatedAt(string $created_at) Return the first ChildProfileResource filtered by the created_at column * @method ChildProfileResource findOneByUpdatedAt(string $updated_at) Return the first ChildProfileResource filtered by the updated_at column * - * @method array findById(int $id) Return ChildProfileResource objects filtered by the id column * @method array findByProfileId(int $profile_id) Return ChildProfileResource objects filtered by the profile_id column * @method array findByResourceId(int $resource_id) Return ChildProfileResource objects filtered by the resource_id column * @method array findByAccess(int $access) Return ChildProfileResource objects filtered by the access column @@ -110,10 +106,10 @@ abstract class ProfileResourceQuery extends ModelCriteria * Go fast if the query is untouched. * * - * $obj = $c->findPk(array(12, 34, 56), $con); + * $obj = $c->findPk(array(12, 34), $con); * * - * @param array[$id, $profile_id, $resource_id] $key Primary key to use for the query + * @param array[$profile_id, $resource_id] $key Primary key to use for the query * @param ConnectionInterface $con an optional connection object * * @return ChildProfileResource|array|mixed the result, formatted by the current formatter @@ -123,7 +119,7 @@ abstract class ProfileResourceQuery extends ModelCriteria if ($key === null) { return null; } - if ((null !== ($obj = ProfileResourceTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1], (string) $key[2]))))) && !$this->formatter) { + if ((null !== ($obj = ProfileResourceTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { // the object is already in the instance pool return $obj; } @@ -151,12 +147,11 @@ abstract class ProfileResourceQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT ID, PROFILE_ID, RESOURCE_ID, ACCESS, CREATED_AT, UPDATED_AT FROM profile_resource WHERE ID = :p0 AND PROFILE_ID = :p1 AND RESOURCE_ID = :p2'; + $sql = 'SELECT PROFILE_ID, RESOURCE_ID, ACCESS, CREATED_AT, UPDATED_AT FROM profile_resource WHERE PROFILE_ID = :p0 AND RESOURCE_ID = :p1'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT); - $stmt->bindValue(':p2', $key[2], PDO::PARAM_INT); $stmt->execute(); } catch (Exception $e) { Propel::log($e->getMessage(), Propel::LOG_ERR); @@ -166,7 +161,7 @@ abstract class ProfileResourceQuery extends ModelCriteria if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { $obj = new ChildProfileResource(); $obj->hydrate($row); - ProfileResourceTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1], (string) $key[2]))); + ProfileResourceTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); } $stmt->closeCursor(); @@ -225,9 +220,8 @@ abstract class ProfileResourceQuery extends ModelCriteria */ public function filterByPrimaryKey($key) { - $this->addUsingAlias(ProfileResourceTableMap::ID, $key[0], Criteria::EQUAL); - $this->addUsingAlias(ProfileResourceTableMap::PROFILE_ID, $key[1], Criteria::EQUAL); - $this->addUsingAlias(ProfileResourceTableMap::RESOURCE_ID, $key[2], Criteria::EQUAL); + $this->addUsingAlias(ProfileResourceTableMap::PROFILE_ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(ProfileResourceTableMap::RESOURCE_ID, $key[1], Criteria::EQUAL); return $this; } @@ -245,58 +239,15 @@ abstract class ProfileResourceQuery extends ModelCriteria return $this->add(null, '1<>1', Criteria::CUSTOM); } foreach ($keys as $key) { - $cton0 = $this->getNewCriterion(ProfileResourceTableMap::ID, $key[0], Criteria::EQUAL); - $cton1 = $this->getNewCriterion(ProfileResourceTableMap::PROFILE_ID, $key[1], Criteria::EQUAL); + $cton0 = $this->getNewCriterion(ProfileResourceTableMap::PROFILE_ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(ProfileResourceTableMap::RESOURCE_ID, $key[1], Criteria::EQUAL); $cton0->addAnd($cton1); - $cton2 = $this->getNewCriterion(ProfileResourceTableMap::RESOURCE_ID, $key[2], Criteria::EQUAL); - $cton0->addAnd($cton2); $this->addOr($cton0); } return $this; } - /** - * Filter the query on the id column - * - * Example usage: - * - * $query->filterById(1234); // WHERE id = 1234 - * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) - * $query->filterById(array('min' => 12)); // WHERE id > 12 - * - * - * @param mixed $id The value to use as filter. - * Use scalar values for equality. - * Use array values for in_array() equivalent. - * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return ChildProfileResourceQuery The current query, for fluid interface - */ - public function filterById($id = null, $comparison = null) - { - if (is_array($id)) { - $useMinMax = false; - if (isset($id['min'])) { - $this->addUsingAlias(ProfileResourceTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); - $useMinMax = true; - } - if (isset($id['max'])) { - $this->addUsingAlias(ProfileResourceTableMap::ID, $id['max'], Criteria::LESS_EQUAL); - $useMinMax = true; - } - if ($useMinMax) { - return $this; - } - if (null === $comparison) { - $comparison = Criteria::IN; - } - } - - return $this->addUsingAlias(ProfileResourceTableMap::ID, $id, $comparison); - } - /** * Filter the query on the profile_id column * @@ -670,10 +621,9 @@ abstract class ProfileResourceQuery extends ModelCriteria public function prune($profileResource = null) { if ($profileResource) { - $this->addCond('pruneCond0', $this->getAliasedColName(ProfileResourceTableMap::ID), $profileResource->getId(), Criteria::NOT_EQUAL); - $this->addCond('pruneCond1', $this->getAliasedColName(ProfileResourceTableMap::PROFILE_ID), $profileResource->getProfileId(), Criteria::NOT_EQUAL); - $this->addCond('pruneCond2', $this->getAliasedColName(ProfileResourceTableMap::RESOURCE_ID), $profileResource->getResourceId(), Criteria::NOT_EQUAL); - $this->combine(array('pruneCond0', 'pruneCond1', 'pruneCond2'), Criteria::LOGICAL_OR); + $this->addCond('pruneCond0', $this->getAliasedColName(ProfileResourceTableMap::PROFILE_ID), $profileResource->getProfileId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(ProfileResourceTableMap::RESOURCE_ID), $profileResource->getResourceId(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; diff --git a/core/lib/Thelia/Model/CartItem.php b/core/lib/Thelia/Model/CartItem.php index 427e7e735..5432bd1ab 100755 --- a/core/lib/Thelia/Model/CartItem.php +++ b/core/lib/Thelia/Model/CartItem.php @@ -60,14 +60,31 @@ class CartItem extends BaseCartItem } } - $this->addQuantity($value); + $this->setQuantity($value); return $this; } - public function addQuantity($quantity) + public function addQuantity($value) { - $this->setQuantity($this->getQuantity() + $quantity); + $currentQuantity = $this->getQuantity(); + $newQuantity = $currentQuantity + $value; + + if($value <= 0) + { + $value = $currentQuantity; + } + + if(ConfigQuery::read("verifyStock", 1) == 1) + { + $productSaleElements = $this->getProductSaleElements(); + + if($productSaleElements->getQuantity() < $newQuantity) { + $newQuantity = $currentQuantity; + } + } + + $this->setQuantity($newQuantity); return $this; } diff --git a/core/lib/Thelia/Model/Country.php b/core/lib/Thelia/Model/Country.php index e64bd4609..5646496da 100755 --- a/core/lib/Thelia/Model/Country.php +++ b/core/lib/Thelia/Model/Country.php @@ -3,10 +3,15 @@ namespace Thelia\Model; use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\Exception\PropelException; +use Propel\Runtime\Propel; use Thelia\Core\Event\Country\CountryEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Model\Base\Country as BaseCountry; +use Thelia\Model\Map\CountryTableMap; +use Thelia\Core\Translation\Translator; + class Country extends BaseCountry { use \Thelia\Model\Tools\ModelEventDispatcherTrait; @@ -16,13 +21,25 @@ class Country extends BaseCountry if($this->getId() === null) { throw new \RuntimeException("impossible to just uncheck default country, choose a new one"); } - CountryQuery::create() - ->filterByByDefault(1) - ->update(array('ByDefault' => 0)); - $this - ->setByDefault(1) - ->save(); + $con = Propel::getWriteConnection(CountryTableMap::DATABASE_NAME); + $con->beginTransaction(); + + try { + CountryQuery::create() + ->filterByByDefault(1) + ->update(array('ByDefault' => 0), $con); + + $this + ->setByDefault(1) + ->save($con); + + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + } public function preInsert(ConnectionInterface $con = null) @@ -64,4 +81,31 @@ class Country extends BaseCountry $this->dispatchEvent(TheliaEvents::AFTER_DELETECOUNTRY, new CountryEvent($this)); } + /** + * Return the default country + * + * @throws LogicException if no default country is defined + */ + public static function getDefaultCountry() { + $dc = CountryQuery::create()->findOneByByDefault(true); + + if ($dc == null) + throw new \LogicException(Translator::getInstance()->trans("Cannot find a default country. Please define one.")); + + return $dc; + } + + /** + * Return the shop country + * + * @throws LogicException if no shop country is defined + */ + public static function getShopLocation() { + $dc = CountryQuery::create()->findOneByShopCountry(true); + + if ($dc == null) + throw new \LogicException(Translator::getInstance()->trans("Cannot find the shop country. Please select a shop country.")); + + return $dc; + } } diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php index 3c45ade33..189b640ab 100755 --- a/core/lib/Thelia/Model/Lang.php +++ b/core/lib/Thelia/Model/Lang.php @@ -2,10 +2,18 @@ namespace Thelia\Model; +use Propel\Runtime\Connection\ConnectionInterface; +use Propel\Runtime\Exception\PropelException; +use Propel\Runtime\Propel; +use Thelia\Core\Event\Lang\LangEvent; +use Thelia\Core\Event\TheliaEvents; use Thelia\Model\Base\Lang as BaseLang; +use Thelia\Model\Base\LangQuery; +use Thelia\Model\Map\LangTableMap; class Lang extends BaseLang { + use \Thelia\Model\Tools\ModelEventDispatcherTrait; /** * Return the default language object, using a local variable to cache it. * @@ -20,4 +28,65 @@ class Lang extends BaseLang { return $default_lang; } + + public function toggleDefault() + { + if($this->getId() === null) { + throw new \RuntimeException("impossible to just uncheck default language, choose a new one"); + } + $con = Propel::getWriteConnection(LangTableMap::DATABASE_NAME); + $con->beginTransaction(); + try { + LangQuery::create() + ->filterByByDefault(1) + ->update(array('ByDefault' => 0), $con); + + $this + ->setByDefault(1) + ->save($con); + + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + } + + public function preInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CREATELANG, new LangEvent($this)); + + return true; + } + + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATELANG, new LangEvent($this)); + } + + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_UPDATELANG, new LangEvent($this)); + + return true; + } + + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_UPDATELANG, new LangEvent($this)); + } + + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETELANG, new LangEvent($this)); + + return true; + } + + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETELANG, new LangEvent($this)); + } + } diff --git a/core/lib/Thelia/Model/Map/AddressTableMap.php b/core/lib/Thelia/Model/Map/AddressTableMap.php index 46e2be02d..ff9925d38 100644 --- a/core/lib/Thelia/Model/Map/AddressTableMap.php +++ b/core/lib/Thelia/Model/Map/AddressTableMap.php @@ -238,8 +238,8 @@ class AddressTableMap extends TableMap $this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), 'CASCADE', 'RESTRICT'); $this->addRelation('CustomerTitle', '\\Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('title_id' => 'id', ), 'RESTRICT', 'RESTRICT'); $this->addRelation('Country', '\\Thelia\\Model\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), 'RESTRICT', 'RESTRICT'); - $this->addRelation('CartRelatedByAddressDeliveryId', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'address_delivery_id', ), null, null, 'CartsRelatedByAddressDeliveryId'); - $this->addRelation('CartRelatedByAddressInvoiceId', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'address_invoice_id', ), null, null, 'CartsRelatedByAddressInvoiceId'); + $this->addRelation('CartRelatedByAddressDeliveryId', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'address_delivery_id', ), 'RESTRICT', 'RESTRICT', 'CartsRelatedByAddressDeliveryId'); + $this->addRelation('CartRelatedByAddressInvoiceId', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'address_invoice_id', ), 'RESTRICT', 'RESTRICT', 'CartsRelatedByAddressInvoiceId'); } // buildRelations() /** diff --git a/core/lib/Thelia/Model/Map/CartItemTableMap.php b/core/lib/Thelia/Model/Map/CartItemTableMap.php index c48d298e0..cf10165ed 100644 --- a/core/lib/Thelia/Model/Map/CartItemTableMap.php +++ b/core/lib/Thelia/Model/Map/CartItemTableMap.php @@ -199,9 +199,9 @@ class CartItemTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::MANY_TO_ONE, array('cart_id' => 'id', ), null, null); - $this->addRelation('Product', '\\Thelia\\Model\\Product', RelationMap::MANY_TO_ONE, array('product_id' => 'id', ), null, null); - $this->addRelation('ProductSaleElements', '\\Thelia\\Model\\ProductSaleElements', RelationMap::MANY_TO_ONE, array('product_sale_elements_id' => 'id', ), null, null); + $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::MANY_TO_ONE, array('cart_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('Product', '\\Thelia\\Model\\Product', RelationMap::MANY_TO_ONE, array('product_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('ProductSaleElements', '\\Thelia\\Model\\ProductSaleElements', RelationMap::MANY_TO_ONE, array('product_sale_elements_id' => 'id', ), 'CASCADE', 'RESTRICT'); } // buildRelations() /** diff --git a/core/lib/Thelia/Model/Map/CartTableMap.php b/core/lib/Thelia/Model/Map/CartTableMap.php index d839b4e91..2f81472cd 100644 --- a/core/lib/Thelia/Model/Map/CartTableMap.php +++ b/core/lib/Thelia/Model/Map/CartTableMap.php @@ -181,11 +181,11 @@ class CartTableMap extends TableMap */ public function buildRelations() { - $this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), null, null); - $this->addRelation('AddressRelatedByAddressDeliveryId', '\\Thelia\\Model\\Address', RelationMap::MANY_TO_ONE, array('address_delivery_id' => 'id', ), null, null); - $this->addRelation('AddressRelatedByAddressInvoiceId', '\\Thelia\\Model\\Address', RelationMap::MANY_TO_ONE, array('address_invoice_id' => 'id', ), null, null); - $this->addRelation('Currency', '\\Thelia\\Model\\Currency', RelationMap::MANY_TO_ONE, array('currency_id' => 'id', ), null, null); - $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'cart_id', ), null, null, 'CartItems'); + $this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('AddressRelatedByAddressDeliveryId', '\\Thelia\\Model\\Address', RelationMap::MANY_TO_ONE, array('address_delivery_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('AddressRelatedByAddressInvoiceId', '\\Thelia\\Model\\Address', RelationMap::MANY_TO_ONE, array('address_invoice_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('Currency', '\\Thelia\\Model\\Currency', RelationMap::MANY_TO_ONE, array('currency_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'cart_id', ), 'CASCADE', 'RESTRICT', 'CartItems'); } // buildRelations() /** @@ -200,6 +200,15 @@ class CartTableMap extends TableMap 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), ); } // getBehaviors() + /** + * Method to invalidate the instance pool of all tables related to cart * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CartItemTableMap::clearInstancePool(); + } /** * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. diff --git a/core/lib/Thelia/Model/Map/CountryTableMap.php b/core/lib/Thelia/Model/Map/CountryTableMap.php index 752f2b34a..d1f1a8a18 100644 --- a/core/lib/Thelia/Model/Map/CountryTableMap.php +++ b/core/lib/Thelia/Model/Map/CountryTableMap.php @@ -57,7 +57,7 @@ class CountryTableMap extends TableMap /** * The total number of columns */ - const NUM_COLUMNS = 8; + const NUM_COLUMNS = 9; /** * The number of lazy-loaded columns @@ -67,7 +67,7 @@ class CountryTableMap extends TableMap /** * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 8; + const NUM_HYDRATE_COLUMNS = 9; /** * the column name for the ID field @@ -99,6 +99,11 @@ class CountryTableMap extends TableMap */ const BY_DEFAULT = 'country.BY_DEFAULT'; + /** + * the column name for the SHOP_COUNTRY field + */ + const SHOP_COUNTRY = 'country.SHOP_COUNTRY'; + /** * the column name for the CREATED_AT field */ @@ -130,12 +135,12 @@ class CountryTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('Id', 'AreaId', 'Isocode', 'Isoalpha2', 'Isoalpha3', 'ByDefault', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('id', 'areaId', 'isocode', 'isoalpha2', 'isoalpha3', 'byDefault', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(CountryTableMap::ID, CountryTableMap::AREA_ID, CountryTableMap::ISOCODE, CountryTableMap::ISOALPHA2, CountryTableMap::ISOALPHA3, CountryTableMap::BY_DEFAULT, CountryTableMap::CREATED_AT, CountryTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('ID', 'AREA_ID', 'ISOCODE', 'ISOALPHA2', 'ISOALPHA3', 'BY_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('id', 'area_id', 'isocode', 'isoalpha2', 'isoalpha3', 'by_default', 'created_at', 'updated_at', ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, ) + self::TYPE_PHPNAME => array('Id', 'AreaId', 'Isocode', 'Isoalpha2', 'Isoalpha3', 'ByDefault', 'ShopCountry', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'areaId', 'isocode', 'isoalpha2', 'isoalpha3', 'byDefault', 'shopCountry', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CountryTableMap::ID, CountryTableMap::AREA_ID, CountryTableMap::ISOCODE, CountryTableMap::ISOALPHA2, CountryTableMap::ISOALPHA3, CountryTableMap::BY_DEFAULT, CountryTableMap::SHOP_COUNTRY, CountryTableMap::CREATED_AT, CountryTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'AREA_ID', 'ISOCODE', 'ISOALPHA2', 'ISOALPHA3', 'BY_DEFAULT', 'SHOP_COUNTRY', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'area_id', 'isocode', 'isoalpha2', 'isoalpha3', 'by_default', 'shop_country', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, ) ); /** @@ -145,12 +150,12 @@ class CountryTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('Id' => 0, 'AreaId' => 1, 'Isocode' => 2, 'Isoalpha2' => 3, 'Isoalpha3' => 4, 'ByDefault' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ), - self::TYPE_STUDLYPHPNAME => array('id' => 0, 'areaId' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'byDefault' => 5, 'createdAt' => 6, 'updatedAt' => 7, ), - self::TYPE_COLNAME => array(CountryTableMap::ID => 0, CountryTableMap::AREA_ID => 1, CountryTableMap::ISOCODE => 2, CountryTableMap::ISOALPHA2 => 3, CountryTableMap::ISOALPHA3 => 4, CountryTableMap::BY_DEFAULT => 5, CountryTableMap::CREATED_AT => 6, CountryTableMap::UPDATED_AT => 7, ), - self::TYPE_RAW_COLNAME => array('ID' => 0, 'AREA_ID' => 1, 'ISOCODE' => 2, 'ISOALPHA2' => 3, 'ISOALPHA3' => 4, 'BY_DEFAULT' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ), - self::TYPE_FIELDNAME => array('id' => 0, 'area_id' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'by_default' => 5, 'created_at' => 6, 'updated_at' => 7, ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, ) + self::TYPE_PHPNAME => array('Id' => 0, 'AreaId' => 1, 'Isocode' => 2, 'Isoalpha2' => 3, 'Isoalpha3' => 4, 'ByDefault' => 5, 'ShopCountry' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'areaId' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'byDefault' => 5, 'shopCountry' => 6, 'createdAt' => 7, 'updatedAt' => 8, ), + self::TYPE_COLNAME => array(CountryTableMap::ID => 0, CountryTableMap::AREA_ID => 1, CountryTableMap::ISOCODE => 2, CountryTableMap::ISOALPHA2 => 3, CountryTableMap::ISOALPHA3 => 4, CountryTableMap::BY_DEFAULT => 5, CountryTableMap::SHOP_COUNTRY => 6, CountryTableMap::CREATED_AT => 7, CountryTableMap::UPDATED_AT => 8, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'AREA_ID' => 1, 'ISOCODE' => 2, 'ISOALPHA2' => 3, 'ISOALPHA3' => 4, 'BY_DEFAULT' => 5, 'SHOP_COUNTRY' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, ), + self::TYPE_FIELDNAME => array('id' => 0, 'area_id' => 1, 'isocode' => 2, 'isoalpha2' => 3, 'isoalpha3' => 4, 'by_default' => 5, 'shop_country' => 6, 'created_at' => 7, 'updated_at' => 8, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, ) ); /** @@ -174,7 +179,8 @@ class CountryTableMap extends TableMap $this->addColumn('ISOCODE', 'Isocode', 'VARCHAR', true, 4, null); $this->addColumn('ISOALPHA2', 'Isoalpha2', 'VARCHAR', false, 2, null); $this->addColumn('ISOALPHA3', 'Isoalpha3', 'VARCHAR', false, 4, null); - $this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, null); + $this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, 0); + $this->addColumn('SHOP_COUNTRY', 'ShopCountry', 'BOOLEAN', true, 1, false); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() @@ -358,6 +364,7 @@ class CountryTableMap extends TableMap $criteria->addSelectColumn(CountryTableMap::ISOALPHA2); $criteria->addSelectColumn(CountryTableMap::ISOALPHA3); $criteria->addSelectColumn(CountryTableMap::BY_DEFAULT); + $criteria->addSelectColumn(CountryTableMap::SHOP_COUNTRY); $criteria->addSelectColumn(CountryTableMap::CREATED_AT); $criteria->addSelectColumn(CountryTableMap::UPDATED_AT); } else { @@ -367,6 +374,7 @@ class CountryTableMap extends TableMap $criteria->addSelectColumn($alias . '.ISOALPHA2'); $criteria->addSelectColumn($alias . '.ISOALPHA3'); $criteria->addSelectColumn($alias . '.BY_DEFAULT'); + $criteria->addSelectColumn($alias . '.SHOP_COUNTRY'); $criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.UPDATED_AT'); } diff --git a/core/lib/Thelia/Model/Map/CurrencyTableMap.php b/core/lib/Thelia/Model/Map/CurrencyTableMap.php index 9c0e65296..3d4e6ebac 100644 --- a/core/lib/Thelia/Model/Map/CurrencyTableMap.php +++ b/core/lib/Thelia/Model/Map/CurrencyTableMap.php @@ -185,7 +185,7 @@ class CurrencyTableMap extends TableMap public function buildRelations() { $this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'RESTRICT', 'RESTRICT', 'Orders'); - $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), null, null, 'Carts'); + $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'CASCADE', 'RESTRICT', 'Carts'); $this->addRelation('ProductPrice', '\\Thelia\\Model\\ProductPrice', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'CASCADE', null, 'ProductPrices'); $this->addRelation('CurrencyI18n', '\\Thelia\\Model\\CurrencyI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CurrencyI18ns'); } // buildRelations() @@ -210,6 +210,7 @@ class CurrencyTableMap extends TableMap { // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CartTableMap::clearInstancePool(); ProductPriceTableMap::clearInstancePool(); CurrencyI18nTableMap::clearInstancePool(); } diff --git a/core/lib/Thelia/Model/Map/CustomerTableMap.php b/core/lib/Thelia/Model/Map/CustomerTableMap.php index 2c1fdfae2..b3cc9d077 100644 --- a/core/lib/Thelia/Model/Map/CustomerTableMap.php +++ b/core/lib/Thelia/Model/Map/CustomerTableMap.php @@ -226,7 +226,7 @@ class CustomerTableMap extends TableMap $this->addRelation('CustomerTitle', '\\Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('title_id' => 'id', ), 'RESTRICT', 'RESTRICT'); $this->addRelation('Address', '\\Thelia\\Model\\Address', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'RESTRICT', 'Addresses'); $this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'RESTRICT', 'RESTRICT', 'Orders'); - $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), null, null, 'Carts'); + $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'RESTRICT', 'Carts'); } // buildRelations() /** @@ -249,6 +249,7 @@ class CustomerTableMap extends TableMap // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. AddressTableMap::clearInstancePool(); + CartTableMap::clearInstancePool(); } /** diff --git a/core/lib/Thelia/Model/Map/NewsletterTableMap.php b/core/lib/Thelia/Model/Map/NewsletterTableMap.php index 192c8cfa6..1aed936b7 100644 --- a/core/lib/Thelia/Model/Map/NewsletterTableMap.php +++ b/core/lib/Thelia/Model/Map/NewsletterTableMap.php @@ -57,7 +57,7 @@ class NewsletterTableMap extends TableMap /** * The total number of columns */ - const NUM_COLUMNS = 7; + const NUM_COLUMNS = 4; /** * The number of lazy-loaded columns @@ -67,7 +67,7 @@ class NewsletterTableMap extends TableMap /** * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 7; + const NUM_HYDRATE_COLUMNS = 4; /** * the column name for the ID field @@ -89,21 +89,6 @@ class NewsletterTableMap extends TableMap */ const LASTNAME = 'newsletter.LASTNAME'; - /** - * the column name for the LOCALE field - */ - const LOCALE = 'newsletter.LOCALE'; - - /** - * the column name for the CREATED_AT field - */ - const CREATED_AT = 'newsletter.CREATED_AT'; - - /** - * the column name for the UPDATED_AT field - */ - const UPDATED_AT = 'newsletter.UPDATED_AT'; - /** * The default string format for model objects of the related table */ @@ -116,12 +101,12 @@ class NewsletterTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('Id', 'Email', 'Firstname', 'Lastname', 'Locale', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('id', 'email', 'firstname', 'lastname', 'locale', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(NewsletterTableMap::ID, NewsletterTableMap::EMAIL, NewsletterTableMap::FIRSTNAME, NewsletterTableMap::LASTNAME, NewsletterTableMap::LOCALE, NewsletterTableMap::CREATED_AT, NewsletterTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('ID', 'EMAIL', 'FIRSTNAME', 'LASTNAME', 'LOCALE', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('id', 'email', 'firstname', 'lastname', 'locale', 'created_at', 'updated_at', ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + self::TYPE_PHPNAME => array('Id', 'Email', 'Firstname', 'Lastname', ), + self::TYPE_STUDLYPHPNAME => array('id', 'email', 'firstname', 'lastname', ), + self::TYPE_COLNAME => array(NewsletterTableMap::ID, NewsletterTableMap::EMAIL, NewsletterTableMap::FIRSTNAME, NewsletterTableMap::LASTNAME, ), + self::TYPE_RAW_COLNAME => array('ID', 'EMAIL', 'FIRSTNAME', 'LASTNAME', ), + self::TYPE_FIELDNAME => array('id', 'email', 'firstname', 'lastname', ), + self::TYPE_NUM => array(0, 1, 2, 3, ) ); /** @@ -131,12 +116,12 @@ class NewsletterTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('Id' => 0, 'Email' => 1, 'Firstname' => 2, 'Lastname' => 3, 'Locale' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ), - self::TYPE_STUDLYPHPNAME => array('id' => 0, 'email' => 1, 'firstname' => 2, 'lastname' => 3, 'locale' => 4, 'createdAt' => 5, 'updatedAt' => 6, ), - self::TYPE_COLNAME => array(NewsletterTableMap::ID => 0, NewsletterTableMap::EMAIL => 1, NewsletterTableMap::FIRSTNAME => 2, NewsletterTableMap::LASTNAME => 3, NewsletterTableMap::LOCALE => 4, NewsletterTableMap::CREATED_AT => 5, NewsletterTableMap::UPDATED_AT => 6, ), - self::TYPE_RAW_COLNAME => array('ID' => 0, 'EMAIL' => 1, 'FIRSTNAME' => 2, 'LASTNAME' => 3, 'LOCALE' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ), - self::TYPE_FIELDNAME => array('id' => 0, 'email' => 1, 'firstname' => 2, 'lastname' => 3, 'locale' => 4, 'created_at' => 5, 'updated_at' => 6, ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + self::TYPE_PHPNAME => array('Id' => 0, 'Email' => 1, 'Firstname' => 2, 'Lastname' => 3, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'email' => 1, 'firstname' => 2, 'lastname' => 3, ), + self::TYPE_COLNAME => array(NewsletterTableMap::ID => 0, NewsletterTableMap::EMAIL => 1, NewsletterTableMap::FIRSTNAME => 2, NewsletterTableMap::LASTNAME => 3, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'EMAIL' => 1, 'FIRSTNAME' => 2, 'LASTNAME' => 3, ), + self::TYPE_FIELDNAME => array('id' => 0, 'email' => 1, 'firstname' => 2, 'lastname' => 3, ), + self::TYPE_NUM => array(0, 1, 2, 3, ) ); /** @@ -159,9 +144,6 @@ class NewsletterTableMap extends TableMap $this->addColumn('EMAIL', 'Email', 'VARCHAR', true, 255, null); $this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', false, 255, null); $this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', false, 255, null); - $this->addColumn('LOCALE', 'Locale', 'VARCHAR', false, 45, null); - $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); - $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() /** @@ -171,19 +153,6 @@ class NewsletterTableMap extends TableMap { } // buildRelations() - /** - * - * Gets the list of behaviors registered for this table - * - * @return array Associative array (name => parameters) of behaviors - */ - public function getBehaviors() - { - return array( - 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), - ); - } // getBehaviors() - /** * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. * @@ -326,17 +295,11 @@ class NewsletterTableMap extends TableMap $criteria->addSelectColumn(NewsletterTableMap::EMAIL); $criteria->addSelectColumn(NewsletterTableMap::FIRSTNAME); $criteria->addSelectColumn(NewsletterTableMap::LASTNAME); - $criteria->addSelectColumn(NewsletterTableMap::LOCALE); - $criteria->addSelectColumn(NewsletterTableMap::CREATED_AT); - $criteria->addSelectColumn(NewsletterTableMap::UPDATED_AT); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.EMAIL'); $criteria->addSelectColumn($alias . '.FIRSTNAME'); $criteria->addSelectColumn($alias . '.LASTNAME'); - $criteria->addSelectColumn($alias . '.LOCALE'); - $criteria->addSelectColumn($alias . '.CREATED_AT'); - $criteria->addSelectColumn($alias . '.UPDATED_AT'); } } diff --git a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php index 86a22b680..7a80d2e12 100644 --- a/core/lib/Thelia/Model/Map/ProductPriceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductPriceTableMap.php @@ -57,7 +57,7 @@ class ProductPriceTableMap extends TableMap /** * The total number of columns */ - const NUM_COLUMNS = 6; + const NUM_COLUMNS = 7; /** * The number of lazy-loaded columns @@ -67,7 +67,7 @@ class ProductPriceTableMap extends TableMap /** * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 6; + const NUM_HYDRATE_COLUMNS = 7; /** * the column name for the PRODUCT_SALE_ELEMENTS_ID field @@ -89,6 +89,11 @@ class ProductPriceTableMap extends TableMap */ const PROMO_PRICE = 'product_price.PROMO_PRICE'; + /** + * the column name for the FROM_DEFAULT_CURRENCY field + */ + const FROM_DEFAULT_CURRENCY = 'product_price.FROM_DEFAULT_CURRENCY'; + /** * the column name for the CREATED_AT field */ @@ -111,12 +116,12 @@ class ProductPriceTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('ProductSaleElementsId', 'CurrencyId', 'Price', 'PromoPrice', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('productSaleElementsId', 'currencyId', 'price', 'promoPrice', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID, ProductPriceTableMap::CURRENCY_ID, ProductPriceTableMap::PRICE, ProductPriceTableMap::PROMO_PRICE, ProductPriceTableMap::CREATED_AT, ProductPriceTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('PRODUCT_SALE_ELEMENTS_ID', 'CURRENCY_ID', 'PRICE', 'PROMO_PRICE', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('product_sale_elements_id', 'currency_id', 'price', 'promo_price', 'created_at', 'updated_at', ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProductSaleElementsId', 'CurrencyId', 'Price', 'PromoPrice', 'FromDefaultCurrency', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('productSaleElementsId', 'currencyId', 'price', 'promoPrice', 'fromDefaultCurrency', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID, ProductPriceTableMap::CURRENCY_ID, ProductPriceTableMap::PRICE, ProductPriceTableMap::PROMO_PRICE, ProductPriceTableMap::FROM_DEFAULT_CURRENCY, ProductPriceTableMap::CREATED_AT, ProductPriceTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('PRODUCT_SALE_ELEMENTS_ID', 'CURRENCY_ID', 'PRICE', 'PROMO_PRICE', 'FROM_DEFAULT_CURRENCY', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('product_sale_elements_id', 'currency_id', 'price', 'promo_price', 'from_default_currency', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) ); /** @@ -126,12 +131,12 @@ class ProductPriceTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('ProductSaleElementsId' => 0, 'CurrencyId' => 1, 'Price' => 2, 'PromoPrice' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ), - self::TYPE_STUDLYPHPNAME => array('productSaleElementsId' => 0, 'currencyId' => 1, 'price' => 2, 'promoPrice' => 3, 'createdAt' => 4, 'updatedAt' => 5, ), - self::TYPE_COLNAME => array(ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID => 0, ProductPriceTableMap::CURRENCY_ID => 1, ProductPriceTableMap::PRICE => 2, ProductPriceTableMap::PROMO_PRICE => 3, ProductPriceTableMap::CREATED_AT => 4, ProductPriceTableMap::UPDATED_AT => 5, ), - self::TYPE_RAW_COLNAME => array('PRODUCT_SALE_ELEMENTS_ID' => 0, 'CURRENCY_ID' => 1, 'PRICE' => 2, 'PROMO_PRICE' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ), - self::TYPE_FIELDNAME => array('product_sale_elements_id' => 0, 'currency_id' => 1, 'price' => 2, 'promo_price' => 3, 'created_at' => 4, 'updated_at' => 5, ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProductSaleElementsId' => 0, 'CurrencyId' => 1, 'Price' => 2, 'PromoPrice' => 3, 'FromDefaultCurrency' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ), + self::TYPE_STUDLYPHPNAME => array('productSaleElementsId' => 0, 'currencyId' => 1, 'price' => 2, 'promoPrice' => 3, 'fromDefaultCurrency' => 4, 'createdAt' => 5, 'updatedAt' => 6, ), + self::TYPE_COLNAME => array(ProductPriceTableMap::PRODUCT_SALE_ELEMENTS_ID => 0, ProductPriceTableMap::CURRENCY_ID => 1, ProductPriceTableMap::PRICE => 2, ProductPriceTableMap::PROMO_PRICE => 3, ProductPriceTableMap::FROM_DEFAULT_CURRENCY => 4, ProductPriceTableMap::CREATED_AT => 5, ProductPriceTableMap::UPDATED_AT => 6, ), + self::TYPE_RAW_COLNAME => array('PRODUCT_SALE_ELEMENTS_ID' => 0, 'CURRENCY_ID' => 1, 'PRICE' => 2, 'PROMO_PRICE' => 3, 'FROM_DEFAULT_CURRENCY' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ), + self::TYPE_FIELDNAME => array('product_sale_elements_id' => 0, 'currency_id' => 1, 'price' => 2, 'promo_price' => 3, 'from_default_currency' => 4, 'created_at' => 5, 'updated_at' => 6, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) ); /** @@ -154,6 +159,7 @@ class ProductPriceTableMap extends TableMap $this->addForeignPrimaryKey('CURRENCY_ID', 'CurrencyId', 'INTEGER' , 'currency', 'ID', true, null, null); $this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null); $this->addColumn('PROMO_PRICE', 'PromoPrice', 'FLOAT', false, null, null); + $this->addColumn('FROM_DEFAULT_CURRENCY', 'FromDefaultCurrency', 'BOOLEAN', true, 1, false); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() @@ -371,6 +377,7 @@ class ProductPriceTableMap extends TableMap $criteria->addSelectColumn(ProductPriceTableMap::CURRENCY_ID); $criteria->addSelectColumn(ProductPriceTableMap::PRICE); $criteria->addSelectColumn(ProductPriceTableMap::PROMO_PRICE); + $criteria->addSelectColumn(ProductPriceTableMap::FROM_DEFAULT_CURRENCY); $criteria->addSelectColumn(ProductPriceTableMap::CREATED_AT); $criteria->addSelectColumn(ProductPriceTableMap::UPDATED_AT); } else { @@ -378,6 +385,7 @@ class ProductPriceTableMap extends TableMap $criteria->addSelectColumn($alias . '.CURRENCY_ID'); $criteria->addSelectColumn($alias . '.PRICE'); $criteria->addSelectColumn($alias . '.PROMO_PRICE'); + $criteria->addSelectColumn($alias . '.FROM_DEFAULT_CURRENCY'); $criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.UPDATED_AT'); } diff --git a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php index a4dc06d9f..f6de901ed 100644 --- a/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductSaleElementsTableMap.php @@ -195,7 +195,7 @@ class ProductSaleElementsTableMap extends TableMap { $this->addRelation('Product', '\\Thelia\\Model\\Product', RelationMap::MANY_TO_ONE, array('product_id' => 'id', ), 'CASCADE', 'RESTRICT'); $this->addRelation('AttributeCombination', '\\Thelia\\Model\\AttributeCombination', RelationMap::ONE_TO_MANY, array('id' => 'product_sale_elements_id', ), 'CASCADE', 'RESTRICT', 'AttributeCombinations'); - $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'product_sale_elements_id', ), null, null, 'CartItems'); + $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'product_sale_elements_id', ), 'CASCADE', 'RESTRICT', 'CartItems'); $this->addRelation('ProductPrice', '\\Thelia\\Model\\ProductPrice', RelationMap::ONE_TO_MANY, array('id' => 'product_sale_elements_id', ), 'CASCADE', null, 'ProductPrices'); } // buildRelations() @@ -219,6 +219,7 @@ class ProductSaleElementsTableMap extends TableMap // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. AttributeCombinationTableMap::clearInstancePool(); + CartItemTableMap::clearInstancePool(); ProductPriceTableMap::clearInstancePool(); } diff --git a/core/lib/Thelia/Model/Map/ProductTableMap.php b/core/lib/Thelia/Model/Map/ProductTableMap.php index 273ed7382..68a34a393 100644 --- a/core/lib/Thelia/Model/Map/ProductTableMap.php +++ b/core/lib/Thelia/Model/Map/ProductTableMap.php @@ -211,7 +211,7 @@ class ProductTableMap extends TableMap $this->addRelation('ProductDocument', '\\Thelia\\Model\\ProductDocument', RelationMap::ONE_TO_MANY, array('id' => 'product_id', ), 'CASCADE', 'RESTRICT', 'ProductDocuments'); $this->addRelation('AccessoryRelatedByProductId', '\\Thelia\\Model\\Accessory', RelationMap::ONE_TO_MANY, array('id' => 'product_id', ), 'CASCADE', 'RESTRICT', 'AccessoriesRelatedByProductId'); $this->addRelation('AccessoryRelatedByAccessory', '\\Thelia\\Model\\Accessory', RelationMap::ONE_TO_MANY, array('id' => 'accessory', ), 'CASCADE', 'RESTRICT', 'AccessoriesRelatedByAccessory'); - $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'product_id', ), null, null, 'CartItems'); + $this->addRelation('CartItem', '\\Thelia\\Model\\CartItem', RelationMap::ONE_TO_MANY, array('id' => 'product_id', ), 'CASCADE', 'RESTRICT', 'CartItems'); $this->addRelation('ProductAssociatedContent', '\\Thelia\\Model\\ProductAssociatedContent', RelationMap::ONE_TO_MANY, array('id' => 'product_id', ), 'CASCADE', 'RESTRICT', 'ProductAssociatedContents'); $this->addRelation('ProductI18n', '\\Thelia\\Model\\ProductI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ProductI18ns'); $this->addRelation('ProductVersion', '\\Thelia\\Model\\ProductVersion', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ProductVersions'); @@ -247,6 +247,7 @@ class ProductTableMap extends TableMap ProductImageTableMap::clearInstancePool(); ProductDocumentTableMap::clearInstancePool(); AccessoryTableMap::clearInstancePool(); + CartItemTableMap::clearInstancePool(); ProductAssociatedContentTableMap::clearInstancePool(); ProductI18nTableMap::clearInstancePool(); ProductVersionTableMap::clearInstancePool(); diff --git a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php index 07e640b8f..a0b17ba64 100644 --- a/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileModuleTableMap.php @@ -57,7 +57,7 @@ class ProfileModuleTableMap extends TableMap /** * The total number of columns */ - const NUM_COLUMNS = 6; + const NUM_COLUMNS = 5; /** * The number of lazy-loaded columns @@ -67,12 +67,7 @@ class ProfileModuleTableMap extends TableMap /** * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 6; - - /** - * the column name for the ID field - */ - const ID = 'profile_module.ID'; + const NUM_HYDRATE_COLUMNS = 5; /** * the column name for the PROFILE_ID field @@ -111,12 +106,12 @@ class ProfileModuleTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('Id', 'ProfileId', 'ModuleId', 'Access', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('id', 'profileId', 'moduleId', 'access', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(ProfileModuleTableMap::ID, ProfileModuleTableMap::PROFILE_ID, ProfileModuleTableMap::MODULE_ID, ProfileModuleTableMap::ACCESS, ProfileModuleTableMap::CREATED_AT, ProfileModuleTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('ID', 'PROFILE_ID', 'MODULE_ID', 'ACCESS', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('id', 'profile_id', 'module_id', 'access', 'created_at', 'updated_at', ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProfileId', 'ModuleId', 'Access', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('profileId', 'moduleId', 'access', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(ProfileModuleTableMap::PROFILE_ID, ProfileModuleTableMap::MODULE_ID, ProfileModuleTableMap::ACCESS, ProfileModuleTableMap::CREATED_AT, ProfileModuleTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('PROFILE_ID', 'MODULE_ID', 'ACCESS', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('profile_id', 'module_id', 'access', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) ); /** @@ -126,12 +121,12 @@ class ProfileModuleTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('Id' => 0, 'ProfileId' => 1, 'ModuleId' => 2, 'Access' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ), - self::TYPE_STUDLYPHPNAME => array('id' => 0, 'profileId' => 1, 'moduleId' => 2, 'access' => 3, 'createdAt' => 4, 'updatedAt' => 5, ), - self::TYPE_COLNAME => array(ProfileModuleTableMap::ID => 0, ProfileModuleTableMap::PROFILE_ID => 1, ProfileModuleTableMap::MODULE_ID => 2, ProfileModuleTableMap::ACCESS => 3, ProfileModuleTableMap::CREATED_AT => 4, ProfileModuleTableMap::UPDATED_AT => 5, ), - self::TYPE_RAW_COLNAME => array('ID' => 0, 'PROFILE_ID' => 1, 'MODULE_ID' => 2, 'ACCESS' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ), - self::TYPE_FIELDNAME => array('id' => 0, 'profile_id' => 1, 'module_id' => 2, 'access' => 3, 'created_at' => 4, 'updated_at' => 5, ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProfileId' => 0, 'ModuleId' => 1, 'Access' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ), + self::TYPE_STUDLYPHPNAME => array('profileId' => 0, 'moduleId' => 1, 'access' => 2, 'createdAt' => 3, 'updatedAt' => 4, ), + self::TYPE_COLNAME => array(ProfileModuleTableMap::PROFILE_ID => 0, ProfileModuleTableMap::MODULE_ID => 1, ProfileModuleTableMap::ACCESS => 2, ProfileModuleTableMap::CREATED_AT => 3, ProfileModuleTableMap::UPDATED_AT => 4, ), + self::TYPE_RAW_COLNAME => array('PROFILE_ID' => 0, 'MODULE_ID' => 1, 'ACCESS' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ), + self::TYPE_FIELDNAME => array('profile_id' => 0, 'module_id' => 1, 'access' => 2, 'created_at' => 3, 'updated_at' => 4, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) ); /** @@ -148,11 +143,10 @@ class ProfileModuleTableMap extends TableMap $this->setPhpName('ProfileModule'); $this->setClassName('\\Thelia\\Model\\ProfileModule'); $this->setPackage('Thelia.Model'); - $this->setUseIdGenerator(true); + $this->setUseIdGenerator(false); // columns - $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); - $this->addForeignKey('PROFILE_ID', 'ProfileId', 'INTEGER', 'profile', 'ID', true, null, null); - $this->addForeignKey('MODULE_ID', 'ModuleId', 'INTEGER', 'module', 'ID', false, null, null); + $this->addForeignPrimaryKey('PROFILE_ID', 'ProfileId', 'INTEGER' , 'profile', 'ID', true, null, null); + $this->addForeignPrimaryKey('MODULE_ID', 'ModuleId', 'INTEGER' , 'module', 'ID', true, null, null); $this->addColumn('ACCESS', 'Access', 'TINYINT', false, null, 0); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); @@ -180,6 +174,59 @@ class ProfileModuleTableMap extends TableMap ); } // getBehaviors() + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \Thelia\Model\ProfileModule $obj A \Thelia\Model\ProfileModule object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getProfileId(), (string) $obj->getModuleId())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \Thelia\Model\ProfileModule object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \Thelia\Model\ProfileModule) { + $key = serialize(array((string) $value->getProfileId(), (string) $value->getModuleId())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ProfileModule object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + /** * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. * @@ -194,11 +241,11 @@ class ProfileModuleTableMap extends TableMap public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { // If the PK cannot be derived from the row, return NULL. - if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ModuleId', TableMap::TYPE_PHPNAME, $indexType)] === null) { return null; } - return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ModuleId', TableMap::TYPE_PHPNAME, $indexType)])); } /** @@ -216,11 +263,7 @@ class ProfileModuleTableMap extends TableMap public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { - return (int) $row[ - $indexType == TableMap::TYPE_NUM - ? 0 + $offset - : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) - ]; + return $pks; } /** @@ -318,14 +361,12 @@ class ProfileModuleTableMap extends TableMap public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { - $criteria->addSelectColumn(ProfileModuleTableMap::ID); $criteria->addSelectColumn(ProfileModuleTableMap::PROFILE_ID); $criteria->addSelectColumn(ProfileModuleTableMap::MODULE_ID); $criteria->addSelectColumn(ProfileModuleTableMap::ACCESS); $criteria->addSelectColumn(ProfileModuleTableMap::CREATED_AT); $criteria->addSelectColumn(ProfileModuleTableMap::UPDATED_AT); } else { - $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.PROFILE_ID'); $criteria->addSelectColumn($alias . '.MODULE_ID'); $criteria->addSelectColumn($alias . '.ACCESS'); @@ -382,7 +423,17 @@ class ProfileModuleTableMap extends TableMap $criteria = $values->buildPkeyCriteria(); } else { // it's a primary key, or an array of pks $criteria = new Criteria(ProfileModuleTableMap::DATABASE_NAME); - $criteria->add(ProfileModuleTableMap::ID, (array) $values, Criteria::IN); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(ProfileModuleTableMap::PROFILE_ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(ProfileModuleTableMap::MODULE_ID, $value[1])); + $criteria->addOr($criterion); + } } $query = ProfileModuleQuery::create()->mergeWith($criteria); @@ -428,10 +479,6 @@ class ProfileModuleTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProfileModule object } - if ($criteria->containsKey(ProfileModuleTableMap::ID) && $criteria->keyContainsValue(ProfileModuleTableMap::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProfileModuleTableMap::ID.')'); - } - // Set the correct dbName $query = ProfileModuleQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php index 5a7f1e07e..4f6bcc412 100644 --- a/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php +++ b/core/lib/Thelia/Model/Map/ProfileResourceTableMap.php @@ -57,7 +57,7 @@ class ProfileResourceTableMap extends TableMap /** * The total number of columns */ - const NUM_COLUMNS = 6; + const NUM_COLUMNS = 5; /** * The number of lazy-loaded columns @@ -67,12 +67,7 @@ class ProfileResourceTableMap extends TableMap /** * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 6; - - /** - * the column name for the ID field - */ - const ID = 'profile_resource.ID'; + const NUM_HYDRATE_COLUMNS = 5; /** * the column name for the PROFILE_ID field @@ -111,12 +106,12 @@ class ProfileResourceTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('Id', 'ProfileId', 'ResourceId', 'Access', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('id', 'profileId', 'resourceId', 'access', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(ProfileResourceTableMap::ID, ProfileResourceTableMap::PROFILE_ID, ProfileResourceTableMap::RESOURCE_ID, ProfileResourceTableMap::ACCESS, ProfileResourceTableMap::CREATED_AT, ProfileResourceTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('ID', 'PROFILE_ID', 'RESOURCE_ID', 'ACCESS', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('id', 'profile_id', 'resource_id', 'access', 'created_at', 'updated_at', ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProfileId', 'ResourceId', 'Access', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('profileId', 'resourceId', 'access', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(ProfileResourceTableMap::PROFILE_ID, ProfileResourceTableMap::RESOURCE_ID, ProfileResourceTableMap::ACCESS, ProfileResourceTableMap::CREATED_AT, ProfileResourceTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('PROFILE_ID', 'RESOURCE_ID', 'ACCESS', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('profile_id', 'resource_id', 'access', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) ); /** @@ -126,12 +121,12 @@ class ProfileResourceTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('Id' => 0, 'ProfileId' => 1, 'ResourceId' => 2, 'Access' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ), - self::TYPE_STUDLYPHPNAME => array('id' => 0, 'profileId' => 1, 'resourceId' => 2, 'access' => 3, 'createdAt' => 4, 'updatedAt' => 5, ), - self::TYPE_COLNAME => array(ProfileResourceTableMap::ID => 0, ProfileResourceTableMap::PROFILE_ID => 1, ProfileResourceTableMap::RESOURCE_ID => 2, ProfileResourceTableMap::ACCESS => 3, ProfileResourceTableMap::CREATED_AT => 4, ProfileResourceTableMap::UPDATED_AT => 5, ), - self::TYPE_RAW_COLNAME => array('ID' => 0, 'PROFILE_ID' => 1, 'RESOURCE_ID' => 2, 'ACCESS' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ), - self::TYPE_FIELDNAME => array('id' => 0, 'profile_id' => 1, 'resource_id' => 2, 'access' => 3, 'created_at' => 4, 'updated_at' => 5, ), - self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + self::TYPE_PHPNAME => array('ProfileId' => 0, 'ResourceId' => 1, 'Access' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ), + self::TYPE_STUDLYPHPNAME => array('profileId' => 0, 'resourceId' => 1, 'access' => 2, 'createdAt' => 3, 'updatedAt' => 4, ), + self::TYPE_COLNAME => array(ProfileResourceTableMap::PROFILE_ID => 0, ProfileResourceTableMap::RESOURCE_ID => 1, ProfileResourceTableMap::ACCESS => 2, ProfileResourceTableMap::CREATED_AT => 3, ProfileResourceTableMap::UPDATED_AT => 4, ), + self::TYPE_RAW_COLNAME => array('PROFILE_ID' => 0, 'RESOURCE_ID' => 1, 'ACCESS' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ), + self::TYPE_FIELDNAME => array('profile_id' => 0, 'resource_id' => 1, 'access' => 2, 'created_at' => 3, 'updated_at' => 4, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) ); /** @@ -148,10 +143,9 @@ class ProfileResourceTableMap extends TableMap $this->setPhpName('ProfileResource'); $this->setClassName('\\Thelia\\Model\\ProfileResource'); $this->setPackage('Thelia.Model'); - $this->setUseIdGenerator(true); + $this->setUseIdGenerator(false); $this->setIsCrossRef(true); // columns - $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addForeignPrimaryKey('PROFILE_ID', 'ProfileId', 'INTEGER' , 'profile', 'ID', true, null, null); $this->addForeignPrimaryKey('RESOURCE_ID', 'ResourceId', 'INTEGER' , 'resource', 'ID', true, null, null); $this->addColumn('ACCESS', 'Access', 'INTEGER', true, null, 0); @@ -196,7 +190,7 @@ class ProfileResourceTableMap extends TableMap { if (Propel::isInstancePoolingEnabled()) { if (null === $key) { - $key = serialize(array((string) $obj->getId(), (string) $obj->getProfileId(), (string) $obj->getResourceId())); + $key = serialize(array((string) $obj->getProfileId(), (string) $obj->getResourceId())); } // if key === null self::$instances[$key] = $obj; } @@ -216,11 +210,11 @@ class ProfileResourceTableMap extends TableMap { if (Propel::isInstancePoolingEnabled() && null !== $value) { if (is_object($value) && $value instanceof \Thelia\Model\ProfileResource) { - $key = serialize(array((string) $value->getId(), (string) $value->getProfileId(), (string) $value->getResourceId())); + $key = serialize(array((string) $value->getProfileId(), (string) $value->getResourceId())); - } elseif (is_array($value) && count($value) === 3) { + } elseif (is_array($value) && count($value) === 2) { // assume we've been passed a primary key"; - $key = serialize(array((string) $value[0], (string) $value[1], (string) $value[2])); + $key = serialize(array((string) $value[0], (string) $value[1])); } elseif ($value instanceof Criteria) { self::$instances = []; @@ -248,11 +242,11 @@ class ProfileResourceTableMap extends TableMap public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) { // If the PK cannot be derived from the row, return NULL. - if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 2 + $offset : static::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)] === null) { + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)] === null) { return null; } - return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 2 + $offset : static::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)])); + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProfileId', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('ResourceId', TableMap::TYPE_PHPNAME, $indexType)])); } /** @@ -368,14 +362,12 @@ class ProfileResourceTableMap extends TableMap public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { - $criteria->addSelectColumn(ProfileResourceTableMap::ID); $criteria->addSelectColumn(ProfileResourceTableMap::PROFILE_ID); $criteria->addSelectColumn(ProfileResourceTableMap::RESOURCE_ID); $criteria->addSelectColumn(ProfileResourceTableMap::ACCESS); $criteria->addSelectColumn(ProfileResourceTableMap::CREATED_AT); $criteria->addSelectColumn(ProfileResourceTableMap::UPDATED_AT); } else { - $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.PROFILE_ID'); $criteria->addSelectColumn($alias . '.RESOURCE_ID'); $criteria->addSelectColumn($alias . '.ACCESS'); @@ -439,9 +431,8 @@ class ProfileResourceTableMap extends TableMap $values = array($values); } foreach ($values as $value) { - $criterion = $criteria->getNewCriterion(ProfileResourceTableMap::ID, $value[0]); - $criterion->addAnd($criteria->getNewCriterion(ProfileResourceTableMap::PROFILE_ID, $value[1])); - $criterion->addAnd($criteria->getNewCriterion(ProfileResourceTableMap::RESOURCE_ID, $value[2])); + $criterion = $criteria->getNewCriterion(ProfileResourceTableMap::PROFILE_ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(ProfileResourceTableMap::RESOURCE_ID, $value[1])); $criteria->addOr($criterion); } } @@ -489,10 +480,6 @@ class ProfileResourceTableMap extends TableMap $criteria = $criteria->buildCriteria(); // build Criteria from ProfileResource object } - if ($criteria->containsKey(ProfileResourceTableMap::ID) && $criteria->keyContainsValue(ProfileResourceTableMap::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.ProfileResourceTableMap::ID.')'); - } - // Set the correct dbName $query = ProfileResourceQuery::create()->mergeWith($criteria); diff --git a/core/lib/Thelia/Model/Product.php b/core/lib/Thelia/Model/Product.php index f48f9e75e..5ec2abf4c 100755 --- a/core/lib/Thelia/Model/Product.php +++ b/core/lib/Thelia/Model/Product.php @@ -12,6 +12,7 @@ use Thelia\Core\Event\Product\ProductEvent; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\Propel; use Thelia\Model\Map\ProductTableMap; +use Thelia\Model\ProductSaleElementsQuery; class Product extends BaseProduct { @@ -47,6 +48,20 @@ class Product extends BaseProduct return $taxCalculator->load($this, $country)->getTaxedPrice($this->getRealLowestPrice()); } + /** + * Return the default PSE for this product. + */ + public function getDefaultSaleElements() { + return ProductSaleElementsQuery::create()->filterByProductId($this->id)->filterByIsDefault(true)->find(); + } + + /** + * Return PSE count fir this product. + */ + public function countSaleElements() { + return ProductSaleElementsQuery::create()->filterByProductId($this->id)->filterByIsDefault(true)->count(); + } + /** * @return the current default category ID for this product */ @@ -100,7 +115,7 @@ class Product extends BaseProduct ; if ($productCategory == null || $productCategory->getCategoryId() != $defaultCategoryId) { - exit; + // Delete the old default category if ($productCategory !== null) $productCategory->delete(); @@ -131,10 +146,10 @@ class Product extends BaseProduct $con = Propel::getWriteConnection(ProductTableMap::DATABASE_NAME); $con->beginTransaction(); - $this->dispatchEvent(TheliaEvents::BEFORE_CREATEPRODUCT, new ProductEvent($this)); try { + // Create the product $this->save($con); @@ -146,29 +161,8 @@ class Product extends BaseProduct $this->setTaxRuleId($taxRuleId); - // Create an empty product sale element - $sale_elements = new ProductSaleElements(); - - $sale_elements - ->setProduct($this) - ->setRef($this->getRef()) - ->setPromo(0) - ->setNewness(0) - ->setWeight($baseWeight) - ->setIsDefault(true) - ->save($con) - ; - - // Create an empty product price in the default currency - $product_price = new ProductPrice(); - - $product_price - ->setProductSaleElements($sale_elements) - ->setPromoPrice($basePrice) - ->setPrice($basePrice) - ->setCurrencyId($priceCurrencyId) - ->save($con) - ; + // Create the default product sale element of this product + $sale_elements = $this->createDefaultProductSaleElement($con, $baseWeight, $basePrice, $priceCurrencyId, true); // Store all the stuff ! $con->commit(); @@ -183,6 +177,38 @@ class Product extends BaseProduct } } + /** + * Create a basic product sale element attached to this product. + */ + public function createDefaultProductSaleElement(ConnectionInterface $con, $weight, $basePrice, $currencyId, $isDefault) { + + // Create an empty product sale element + $sale_elements = new ProductSaleElements(); + + $sale_elements + ->setProduct($this) + ->setRef($this->getRef()) + ->setPromo(0) + ->setNewness(0) + ->setWeight($weight) + ->setIsDefault($isDefault) + ->save($con) + ; + + // Create an empty product price in the default currency + $product_price = new ProductPrice(); + + $product_price + ->setProductSaleElements($sale_elements) + ->setPromoPrice($basePrice) + ->setPrice($basePrice) + ->setCurrencyId($currencyId) + ->save($con) + ; + + return $sale_elements; + } + /** * Calculate next position relative to our default category */ diff --git a/core/lib/Thelia/Model/Profile.php b/core/lib/Thelia/Model/Profile.php index 8f3a61edd..b140146f3 100644 --- a/core/lib/Thelia/Model/Profile.php +++ b/core/lib/Thelia/Model/Profile.php @@ -1,5 +1,4 @@ AdminResources::SUPERADMINISTRATOR, + ); + foreach(ProfileQuery::create()->find() as $profile) { + $profileList[$profile->getId()] = $profile->getCode(); + } + return $profileList; + } } // ProfileQuery diff --git a/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php b/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php index 6e54417e3..dac865a7d 100644 --- a/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php +++ b/core/lib/Thelia/Tests/Condition/ConditionEvaluatorTest.php @@ -25,7 +25,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Coupon\ConditionCollection; use Thelia\Model\CurrencyQuery; @@ -57,21 +57,21 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -94,17 +94,17 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue('EUR')); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue(401.00)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => '>', MatchForTotalAmountManager::INPUT2 => '==' @@ -131,21 +131,21 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -168,17 +168,17 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue('EUR')); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue(400.00)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => '>', MatchForTotalAmountManager::INPUT2 => '==' @@ -205,21 +205,21 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -242,20 +242,20 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue('EUR')); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue(401.00)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(5)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => '>', MatchForTotalAmountManager::INPUT2 => '==' @@ -265,7 +265,7 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase MatchForTotalAmountManager::INPUT2 => 'EUR'); $condition1->setValidatorsFromForm($operators, $values); - $condition2 = new MatchForXArticlesManager($stubAdapter); + $condition2 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => '>' ); @@ -292,21 +292,21 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -329,20 +329,20 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue('EUR')); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue(400.00)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(5)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => '>', MatchForTotalAmountManager::INPUT2 => '==' @@ -352,7 +352,7 @@ class ConditionEvaluatorTest extends \PHPUnit_Framework_TestCase MatchForTotalAmountManager::INPUT2 => 'EUR'); $condition1->setValidatorsFromForm($operators, $values); - $condition2 = new MatchForXArticlesManager($stubAdapter); + $condition2 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => '>' ); diff --git a/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php b/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php index 295d9a308..28e81ee77 100644 --- a/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php +++ b/core/lib/Thelia/Tests/Condition/ConditionFactoryTest.php @@ -26,7 +26,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\ConditionFactory; use Thelia\Condition\Operators; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Coupon\ConditionCollection; use Thelia\Model\CurrencyQuery; @@ -61,21 +61,21 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -84,17 +84,17 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->getMock(); $stubContainer->expects($this->any()) ->method('get') - ->will($this->returnValue(new MatchForTotalAmountManager($stubAdapter))); + ->will($this->returnValue(new MatchForTotalAmountManager($stubFacade))); $stubContainer->expects($this->any()) ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -125,21 +125,21 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -148,17 +148,17 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->getMock(); $stubContainer->expects($this->any()) ->method('get') - ->will($this->returnValue(new MatchForTotalAmountManager($stubAdapter))); + ->will($this->returnValue(new MatchForTotalAmountManager($stubFacade))); $stubContainer->expects($this->any()) ->method('has') ->will($this->returnValueMap(array('unset.service', false))); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -187,21 +187,21 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); @@ -210,17 +210,17 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->getMock(); $stubContainer->expects($this->any()) ->method('get') - ->will($this->returnValue(new MatchForTotalAmountManager($stubAdapter))); + ->will($this->returnValue(new MatchForTotalAmountManager($stubFacade))); $stubContainer->expects($this->any()) ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -231,7 +231,7 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ); $condition1->setValidatorsFromForm($operators, $values); - $condition2 = new MatchForTotalAmountManager($stubAdapter); + $condition2 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -266,28 +266,28 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); $stubContainer = $this->getMockBuilder('\Symfony\Component\DependencyInjection\Container') ->disableOriginalConstructor() ->getMock(); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $stubContainer->expects($this->any()) ->method('get') ->will($this->returnValue($condition1)); @@ -296,7 +296,7 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(true)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); @@ -331,28 +331,28 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getTranslator') ->will($this->returnValue($stubTranslator)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); $currencies = CurrencyQuery::create(); $currencies = $currencies->find(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue($currencies)); $stubContainer = $this->getMockBuilder('\Symfony\Component\DependencyInjection\Container') ->disableOriginalConstructor() ->getMock(); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $stubContainer->expects($this->any()) ->method('get') ->will($this->returnValue($condition1)); @@ -361,7 +361,7 @@ class ConditionFactoryTest extends \PHPUnit_Framework_TestCase ->method('has') ->will($this->returnValue(false)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getContainer') ->will($this->returnValue($stubContainer)); diff --git a/core/lib/Thelia/Tests/Condition/Implementation/MatchForEveryoneManagerTest.php b/core/lib/Thelia/Tests/Condition/Implementation/MatchForEveryoneManagerTest.php index 726ed4988..ba097f750 100644 --- a/core/lib/Thelia/Tests/Condition/Implementation/MatchForEveryoneManagerTest.php +++ b/core/lib/Thelia/Tests/Condition/Implementation/MatchForEveryoneManagerTest.php @@ -25,7 +25,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Model\Currency; /** @@ -41,7 +41,7 @@ use Thelia\Model\Currency; */ class MatchForEveryoneManagerTest extends \PHPUnit_Framework_TestCase { - /** @var AdapterInterface $stubTheliaAdapter */ + /** @var FacadeInterface $stubTheliaAdapter */ protected $stubTheliaAdapter = null; /** @@ -54,19 +54,19 @@ class MatchForEveryoneManagerTest extends \PHPUnit_Framework_TestCase */ public function generateAdapterStub($cartTotalPrice = 400, $checkoutCurrency = 'EUR') { - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue($cartTotalPrice)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue($checkoutCurrency)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); @@ -74,11 +74,11 @@ class MatchForEveryoneManagerTest extends \PHPUnit_Framework_TestCase $currency1->setCode('EUR'); $currency2 = new Currency(); $currency2->setCode('USD'); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue(array($currency1, $currency2))); - return $stubAdapter; + return $stubFacade; } /** @@ -89,10 +89,10 @@ class MatchForEveryoneManagerTest extends \PHPUnit_Framework_TestCase */ public function testValidBackOfficeInputOperator() { - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - /** @var AdapterInterface $stubAdapter */ - $condition1 = new MatchForEveryoneManager($stubAdapter); + /** @var FacadeInterface $stubFacade */ + $condition1 = new MatchForEveryoneManager($stubFacade); $operators = array(); $values = array(); $condition1->setValidatorsFromForm($operators, $values); @@ -112,10 +112,10 @@ class MatchForEveryoneManagerTest extends \PHPUnit_Framework_TestCase */ public function testIsMatching() { - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - /** @var AdapterInterface $stubAdapter */ - $condition1 = new MatchForEveryoneManager($stubAdapter); + /** @var FacadeInterface $stubFacade */ + $condition1 = new MatchForEveryoneManager($stubFacade); $isValid = $condition1->isMatching(); diff --git a/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php b/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php index cc142ac38..465f27225 100644 --- a/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php +++ b/core/lib/Thelia/Tests/Condition/Implementation/MatchForTotalAmountManagerTest.php @@ -25,7 +25,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Exception\InvalidConditionValueException; use Thelia\Model\Currency; @@ -42,7 +42,7 @@ use Thelia\Model\Currency; */ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase { - /** @var AdapterInterface $stubTheliaAdapter */ + /** @var FacadeInterface $stubTheliaAdapter */ protected $stubTheliaAdapter = null; /** @@ -55,19 +55,19 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function generateAdapterStub($cartTotalPrice = 400, $checkoutCurrency = 'EUR') { - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCartTotalPrice') ->will($this->returnValue($cartTotalPrice)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getCheckoutCurrency') ->will($this->returnValue($checkoutCurrency)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); @@ -75,11 +75,11 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase $currency1->setCode('EUR'); $currency2 = new Currency(); $currency2->setCode('USD'); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getAvailableCurrencies') ->will($this->returnValue(array($currency1, $currency2))); - return $stubAdapter; + return $stubFacade; } /** @@ -100,10 +100,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputOperator() { - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - /** @var AdapterInterface $stubAdapter */ - $condition1 = new MatchForTotalAmountManager($stubAdapter); + /** @var FacadeInterface $stubFacade */ + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::IN, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -129,10 +129,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputOperator2() { - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - /** @var AdapterInterface $stubAdapter */ - $condition1 = new MatchForTotalAmountManager($stubAdapter); + /** @var FacadeInterface $stubFacade */ + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::INFERIOR @@ -158,10 +158,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputValue() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -187,10 +187,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputValue2() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -215,10 +215,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionInferior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::INFERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -243,10 +243,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionInferior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::INFERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -271,10 +271,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionInferiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::INFERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -299,10 +299,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionInferiorEquals2() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::INFERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -327,10 +327,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionInferiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(401, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(401, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::INFERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -355,10 +355,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionEqual() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -383,10 +383,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionEqual() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -411,10 +411,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionSuperiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(401, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(401, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -439,10 +439,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionSuperiorEquals2() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -467,10 +467,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionSuperiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -495,10 +495,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionSuperior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(401, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(401, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -523,10 +523,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionSuperior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(399, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(399, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::SUPERIOR, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -551,10 +551,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingConditionCurrency() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL @@ -579,10 +579,10 @@ class MatchForTotalAmountManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingConditionCurrency() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->generateAdapterStub(400.00, 'EUR'); + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->generateAdapterStub(400.00, 'EUR'); - $condition1 = new MatchForTotalAmountManager($stubAdapter); + $condition1 = new MatchForTotalAmountManager($stubFacade); $operators = array( MatchForTotalAmountManager::INPUT1 => Operators::EQUAL, MatchForTotalAmountManager::INPUT2 => Operators::EQUAL diff --git a/core/lib/Thelia/Tests/Condition/Implementation/MatchForXArticlesManagerTest.php b/core/lib/Thelia/Tests/Condition/Implementation/MatchForXArticlesManagerTest.php index 4243b1082..a618d3dcd 100644 --- a/core/lib/Thelia/Tests/Condition/Implementation/MatchForXArticlesManagerTest.php +++ b/core/lib/Thelia/Tests/Condition/Implementation/MatchForXArticlesManagerTest.php @@ -26,7 +26,7 @@ namespace Thelia\Condition\Implementation; use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; use Thelia\Condition\SerializableCondition; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; /** * Created by JetBrains PhpStorm. @@ -59,20 +59,20 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputOperator() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - /** @var AdapterInterface $stubAdapter */ - $stubAdapter->expects($this->any()) + /** @var FacadeInterface $stubFacade */ + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::IN ); @@ -96,19 +96,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testInValidBackOfficeInputValue() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR ); @@ -132,19 +132,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleInferior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::INFERIOR ); @@ -168,19 +168,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingRuleInferior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::INFERIOR ); @@ -204,19 +204,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleInferiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::INFERIOR_OR_EQUAL, ); @@ -240,19 +240,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleInferiorEquals2() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::INFERIOR_OR_EQUAL ); @@ -276,19 +276,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingRuleInferiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::INFERIOR_OR_EQUAL ); @@ -312,19 +312,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleEqual() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::EQUAL ); @@ -348,19 +348,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingRuleEqual() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::EQUAL ); @@ -384,19 +384,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleSuperiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL ); @@ -420,19 +420,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleSuperiorEquals2() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL ); @@ -456,19 +456,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingRuleSuperiorEquals() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR_OR_EQUAL ); @@ -492,19 +492,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testMatchingRuleSuperior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR ); @@ -528,19 +528,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase */ public function testNotMatchingRuleSuperior() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR ); @@ -558,19 +558,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase public function testGetSerializableRule() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR ); @@ -594,19 +594,19 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase public function testGetAvailableOperators() { - /** @var AdapterInterface $stubAdapter */ - $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') + /** @var FacadeInterface $stubFacade */ + $stubFacade = $this->getMockBuilder('\Thelia\Coupon\BaseFacade') ->disableOriginalConstructor() ->getMock(); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getNbArticlesInCart') ->will($this->returnValue(4)); - $stubAdapter->expects($this->any()) + $stubFacade->expects($this->any()) ->method('getConditionEvaluator') ->will($this->returnValue(new ConditionEvaluator())); - $condition1 = new MatchForXArticlesManager($stubAdapter); + $condition1 = new MatchForXArticlesManager($stubFacade); $operators = array( MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR ); @@ -630,35 +630,6 @@ class MatchForXArticlesManagerTest extends \PHPUnit_Framework_TestCase } -// public function testGetValidators() -// { -// $stubAdapter = $this->getMockBuilder('\Thelia\Coupon\BaseAdapter') -// ->disableOriginalConstructor() -// ->getMock(); -// -// $stubAdapter->expects($this->any()) -// ->method('getNbArticlesInCart') -// ->will($this->returnValue(4)); -// -// $condition1 = new MatchForXArticlesManager($stubAdapter); -// $operators = array( -// MatchForXArticlesManager::INPUT1 => Operators::SUPERIOR -// ); -// $values = array( -// MatchForXArticlesManager::INPUT1 => 4 -// ); -// $condition1->setValidatorsFromForm($operators, $values); -// -// $expected = array( -// $operators, -// $values -// ); -// $actual = $condition1->getValidators(); -// -// $this->assertEquals($expected, $actual); -// -// } - /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. diff --git a/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php b/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php index 438a025de..8e2d0addb 100644 --- a/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php +++ b/core/lib/Thelia/Tests/Coupon/CouponBaseAdapterTest.php @@ -28,7 +28,7 @@ namespace Thelia\Coupon; * Date: 8/19/13 * Time: 3:24 PM * - * Unit Test BaseAdapter Class + * Unit Test BaseFacade Class * * @package Coupon * @author Guillaume MOREL @@ -43,61 +43,5 @@ class CouponBaseAdapterTest extends \PHPUnit_Framework_TestCase 'This test has not been implemented yet.' ); } -// /** -// * @var BaseAdapter -// */ -// protected $object; -// -// /** -// * Sets up the fixture, for example, opens a network connection. -// * This method is called before a test is executed. -// */ -// protected function setUp() -// { -// $this->object = new BaseAdapter; -// } -// -// /** -// * Tears down the fixture, for example, closes a network connection. -// * This method is called after a test is executed. -// */ -// protected function tearDown() -// { -// } -// -// /** -// * @covers Thelia\Coupon\BaseAdapter::getCart -// * @todo Implement testGetCart(). -// */ -// public function testGetCart() -// { -// // Remove the following lines when you implement this test. -// $this->markTestIncomplete( -// 'This test has not been implemented yet.' -// ); -// } -// -// /** -// * @covers Thelia\Coupon\BaseAdapter::getDeliveryAddress -// * @todo Implement testGetDeliveryAddress(). -// */ -// public function testGetDeliveryAddress() -// { -// // Remove the following lines when you implement this test. -// $this->markTestIncomplete( -// 'This test has not been implemented yet.' -// ); -// } -// -// /** -// * @covers Thelia\Coupon\BaseAdapter::getCustomer -// * @todo Implement testGetCustomer(). -// */ -// public function testGetCustomer() -// { -// // Remove the following lines when you implement this test. -// $this->markTestIncomplete( -// 'This test has not been implemented yet.' -// ); -// } + } diff --git a/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php b/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php index 21a0cfa4b..648dbcd19 100644 --- a/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php +++ b/core/lib/Thelia/Tests/Coupon/CouponFactoryTest.php @@ -23,14 +23,6 @@ namespace Thelia\Coupon; -use Thelia\Constraint\Validator\PriceParam; -use Thelia\Constraint\Validator\RuleValidator; -use Thelia\Constraint\Rule\AvailableForTotalAmount; -use Thelia\Constraint\Rule\Operators; -use Thelia\Coupon\Type\CouponInterface; -use Thelia\Exception\CouponExpiredException; -use Thelia\Model\Coupon; - require_once 'CouponManagerTest.php'; /** @@ -53,293 +45,4 @@ class CouponFactoryTest extends \PHPUnit_Framework_TestCase 'This test has not been implemented yet.' ); } - -// /** -// * Sets up the fixture, for example, opens a network connection. -// * This method is called before a test is executed. -// */ -// protected function setUp() -// { -// } -// -// /** -// * Fake CouponQuery->findByCode -// * -// * @param string $code Coupon code -// * @param string $type Coupon type (object) -// * @param string $title Coupon title -// * @param string $shortDescription Coupon short description -// * @param string $description Coupon description -// * @param float $amount Coupon amount -// * @param bool $isUsed If Coupon has been used yet -// * @param bool $isEnabled If Coupon is enabled -// * @param \DateTime $expirationDate When Coupon expires -// * @param ConditionCollection $rules Coupon rules -// * @param bool $isCumulative If Coupon is cumulative -// * @param bool $isRemovingPostage If Coupon is removing postage -// * -// * @return Coupon -// */ -// public function generateCouponModelMock( -// $code = null, -// $type = null, -// $title = null, -// $shortDescription = null, -// $description = null, -// $amount = null, -// $isUsed = null, -// $isEnabled = null, -// $expirationDate = null, -// $rules = null, -// $isCumulative = null, -// $isRemovingPostage = null -// ) { -// $coupon = $this->generateValidCoupon( -// $code, -// $type, -// $title, -// $shortDescription, -// $description, -// $amount, -// $isUsed, -// $isEnabled, -// $expirationDate, -// $rules, -// $isCumulative, -// $isRemovingPostage -// ); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->getMock( -// 'Thelia\Coupon\BaseAdapter', -// array('findOneCouponByCode'), -// array() -// ); -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('findOneCouponByCode') -// ->will($this->returnValue($coupon)); -// -// return $stubCouponBaseAdapter; -// } -// -// -// -// /** -// * Test if an expired Coupon is build or not (superior) -// * -// * @covers Thelia\Coupon\CouponFactory::buildCouponFromCode -// * @expectedException \Thelia\Exception\CouponExpiredException -// */ -// public function testBuildCouponFromCodeExpiredDateBefore() -// { -// $date = new \DateTime(); -// $date->setTimestamp(strtotime("today - 2 months")); -// -// /** @var AdapterInterface $mockAdapter */ -// $mockAdapter = $this->generateCouponModelMock(null, null, null, null, null, null, null, null, $date); -// $couponFactory = new CouponFactory($mockAdapter); -// $coupon = $couponFactory->buildCouponFromCode('XMAS1'); -// } -// -// /** -// * Test if an expired Coupon is build or not (equal) -// * -// * @covers Thelia\Coupon\CouponFactory::buildCouponFromCode -// * @expectedException \Thelia\Exception\CouponExpiredException -// */ -// public function testBuildCouponFromCodeExpiredDateEquals() -// { -// $date = new \DateTime(); -// -// /** @var AdapterInterface $mockAdapter */ -// $mockAdapter = $this->generateCouponModelMock(null, null, null, null, null, null, null, null, $date); -// $couponFactory = new CouponFactory($mockAdapter); -// $coupon = $couponFactory->buildCouponFromCode('XMAS1'); -// } -// -// /** -// * Test if an expired Coupon is build or not (equal) -// * -// * @covers Thelia\Coupon\CouponFactory::buildCouponFromCode -// * @expectedException \Thelia\Exception\InvalidConditionException -// */ -// public function testBuildCouponFromCodeWithoutRule() -// { -// /** @var AdapterInterface $mockAdapter */ -// $mockAdapter = $this->generateCouponModelMock(null, null, null, null, null, null, null, null, null, new ConditionCollection(array())); -// $couponFactory = new CouponFactory($mockAdapter); -// $coupon = $couponFactory->buildCouponFromCode('XMAS1'); -// } -// -// /** -// * Test if a CouponInterface can be built from database -// * -// * @covers Thelia\Coupon\CouponFactory::buildCouponFromCode -// */ -// public function testBuildCouponFromCode() -// { -// /** @var AdapterInterface $mockAdapter */ -// $mockAdapter = $this->generateCouponModelMock(); -// $couponFactory = new CouponFactory($mockAdapter); -// /** @var CouponInterface $coupon */ -// $coupon = $couponFactory->buildCouponFromCode('XMAS1'); -// -// $this->assertEquals('XMAS1', $coupon->getCode()); -// $this->assertEquals('Thelia\Coupon\Type\RemoveXAmount', get_class($coupon)); -// $this->assertEquals(CouponManagerTest::VALID_TITLE, $coupon->getTitle()); -// $this->assertEquals(CouponManagerTest::VALID_SHORT_DESCRIPTION, $coupon->getShortDescription()); -// $this->assertEquals(CouponManagerTest::VALID_DESCRIPTION, $coupon->getDescription()); -// $this->assertEquals(10.00, $coupon->getDiscount()); -// $this->assertEquals(1, $coupon->isEnabled()); -// -// $date = new \DateTime(); -// $date->setTimestamp(strtotime("today + 2 months")); -// $this->assertEquals($date, $coupon->getExpirationDate()); -// -// $rules = $this->generateValidRules(); -// $this->assertEquals($rules, $coupon->getRules()); -// -// $this->assertEquals(1, $coupon->isCumulative()); -// $this->assertEquals(0, $coupon->isRemovingPostage()); -// } -// -// /** -// * Generate valid CouponRuleInterfaces -// * -// * @return ConditionCollection Set of ConditionManagerInterface -// */ -// protected function generateValidRules() -// { -//// $rule1 = new AvailableForTotalAmount( -//// , array( -//// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -//// Operators::SUPERIOR, -//// new PriceParam( -//// , 40.00, 'EUR' -//// ) -//// ) -//// ) -//// ); -//// $rule2 = new AvailableForTotalAmount( -//// , array( -//// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -//// Operators::INFERIOR, -//// new PriceParam( -//// , 400.00, 'EUR' -//// ) -//// ) -//// ) -//// ); -//// $rules = new ConditionCollection(array($rule1, $rule2)); -//// -//// return $rules; -// } -// -// /** -// * Generate valid CouponInterface -// * -// * @param string $code Coupon code -// * @param string $type Coupon type (object) -// * @param string $title Coupon title -// * @param string $shortDescription Coupon short description -// * @param string $description Coupon description -// * @param float $amount Coupon amount -// * @param bool $isUsed If Coupon has been used yet -// * @param bool $isEnabled If Coupon is enabled -// * @param \DateTime $expirationDate When Coupon expires -// * @param ConditionCollection $rules Coupon rules -// * @param bool $isCumulative If Coupon is cumulative -// * @param bool $isRemovingPostage If Coupon is removing postage -// * -// * @return Coupon -// */ -// public function generateValidCoupon( -// $code = null, -// $type = null, -// $title = null, -// $shortDescription = null, -// $description = null, -// $amount = null, -// $isUsed = null, -// $isEnabled = null, -// $expirationDate = null, -// $rules = null, -// $isCumulative = null, -// $isRemovingPostage = null -// ) { -// $coupon = new Coupon(); -// -// if ($code === null) { -// $code = 'XMAS1'; -// } -// $coupon->setCode($code); -// -// if ($type === null) { -// $type = 'Thelia\Coupon\Type\RemoveXAmount'; -// } -// $coupon->setType($type); -// -// if ($title === null) { -// $title = CouponManagerTest::VALID_TITLE; -// } -// $coupon->setTitle($title); -// -// if ($shortDescription === null) { -// $shortDescription = CouponManagerTest::VALID_SHORT_DESCRIPTION; -// } -// $coupon->setShortDescription($shortDescription); -// -// if ($description === null) { -// $description = CouponManagerTest::VALID_DESCRIPTION; -// } -// $coupon->setDescription($description); -// -// if ($amount === null) { -// $amount = 10.00; -// } -// $coupon->setAmount($amount); -// -// if ($isUsed === null) { -// $isUsed = 1; -// } -// $coupon->setIsUsed($isUsed); -// -// if ($isEnabled === null) { -// $isEnabled = 1; -// } -// $coupon->setIsEnabled($isEnabled); -// -// if ($isCumulative === null) { -// $isCumulative = 1; -// } -// if ($isRemovingPostage === null) { -// $isRemovingPostage = 0; -// } -// -// if ($expirationDate === null) { -// $date = new \DateTime(); -// $coupon->setExpirationDate( -// $date->setTimestamp(strtotime("today + 2 months")) -// ); -// } -// -// if ($rules === null) { -// $rules = $this->generateValidRules(); -// } -// -// $coupon->setSerializedConditions(base64_encode(serialize($rules))); -// -// $coupon->setIsCumulative($isCumulative); -// $coupon->setIsRemovingPostage($isRemovingPostage); -// -// return $coupon; -// } -// -// /** -// * Tears down the fixture, for example, closes a network connection. -// * This method is called after a test is executed. -// */ -// protected function tearDown() -// { -// } } diff --git a/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php b/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php index 1d1ba7c72..751a1ba33 100644 --- a/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php +++ b/core/lib/Thelia/Tests/Coupon/CouponManagerTest.php @@ -23,11 +23,6 @@ namespace Thelia\Coupon; -use Thelia\Constraint\Validator\PriceParam; -use Thelia\Constraint\Validator\RuleValidator; -use Thelia\Constraint\Rule\Operators; -use Thelia\Coupon\Type\CouponInterface; -use Thelia\Tools\PhpUnitUtils; /** * Created by JetBrains PhpStorm. @@ -49,761 +44,5 @@ class CouponManagerTest extends \PHPUnit_Framework_TestCase 'This test has not been implemented yet.' ); } -// CONST VALID_CODE = 'XMAS'; -// CONST VALID_TITLE = 'XMAS coupon'; -// CONST VALID_SHORT_DESCRIPTION = 'Coupon for Christmas removing 10€ if your total checkout is more than 40€'; -// CONST VALID_DESCRIPTION = '

Lorem ipsum dolor sit amet

Consectetur adipiscing elit. Cras at luctus tellus. Integer turpis mauris, aliquet vitae risus tristique, pellentesque vestibulum urna. Vestibulum sodales laoreet lectus dictum suscipit. Praesent vulputate, sem id varius condimentum, quam magna tempor elit, quis venenatis ligula nulla eget libero. Cras egestas euismod tellus, id pharetra leo suscipit quis. Donec lacinia ac lacus et ultricies. Nunc in porttitor neque. Proin at quam congue, consectetur orci sed, congue nulla. Nulla eleifend nunc ligula, nec pharetra elit tempus quis. Vivamus vel mauris sed est dictum blandit. Maecenas blandit dapibus velit ut sollicitudin. In in euismod mauris, consequat viverra magna. Cras velit velit, sollicitudin commodo tortor gravida, tempus varius nulla. -// -//Donec rhoncus leo mauris, id porttitor ante luctus tempus. -// -//Curabitur quis augue feugiat, ullamcorper mauris ac, interdum mi. Quisque aliquam lorem vitae felis lobortis, id interdum turpis mattis. Vestibulum diam massa, ornare congue blandit quis, facilisis at nisl. In tortor metus, venenatis non arcu nec, sollicitudin ornare nisl. Nunc erat risus, varius nec urna at, iaculis lacinia elit. Aenean ut felis tempus, tincidunt odio non, sagittis nisl. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec vitae hendrerit elit. Nunc sit amet gravida risus, euismod lobortis massa. Nam a erat mauris. Nam a malesuada lorem. Nulla id accumsan dolor, sed rhoncus tellus. Quisque dictum felis sed leo auctor, at volutpat lectus viverra. Morbi rutrum, est ac aliquam imperdiet, nibh sem sagittis justo, ac mattis magna lacus eu nulla. -// -//Duis interdum lectus nulla, nec pellentesque sapien condimentum at. Suspendisse potenti. Sed eu purus tellus. Nunc quis rhoncus metus. Fusce vitae tellus enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam tempor porttitor erat vitae iaculis. Sed est elit, consequat non ornare vitae, vehicula eget lectus. Etiam consequat sapien mauris, eget consectetur magna imperdiet eget. Nunc sollicitudin luctus velit, in commodo nulla adipiscing fermentum. Fusce nisi sapien, posuere vitae metus sit amet, facilisis sollicitudin dui. Fusce ultricies auctor enim sit amet iaculis. Morbi at vestibulum enim, eget adipiscing eros. -// -//Praesent ligula lorem, faucibus ut metus quis, fermentum iaculis erat. Pellentesque elit erat, lacinia sed semper ac, sagittis vel elit. Nam eu convallis est. Curabitur rhoncus odio vitae consectetur pellentesque. Nam vitae arcu nec ante scelerisque dignissim vel nec neque. Suspendisse augue nulla, mollis eget dui et, tempor facilisis erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac diam ipsum. Donec convallis dui ultricies velit auctor, non lobortis nulla ultrices. Morbi vitae dignissim ante, sit amet lobortis tortor. Nunc dapibus condimentum augue, in molestie neque congue non. -// -//Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesuada tortor vel erat volutpat tincidunt. In vehicula diam est, a convallis eros scelerisque ut. Donec aliquet venenatis iaculis. Ut a arcu gravida, placerat dui eu, iaculis nisl. Quisque adipiscing orci sit amet dui dignissim lacinia. Sed vulputate lorem non dolor adipiscing ornare. Morbi ornare id nisl id aliquam. Ut fringilla elit ante, nec lacinia enim fermentum sit amet. Aenean rutrum lorem eu convallis pharetra. Cras malesuada varius metus, vitae gravida velit. Nam a varius ipsum, ac commodo dolor. Phasellus nec elementum elit. Etiam vel adipiscing leo.'; -// -// /** -// * Sets up the fixture, for example, opens a network connection. -// * This method is called before a test is executed. -// */ -// protected function setUp() -// { -// } -// -// /** -// * Test getDiscount() behaviour -// * Entering : 1 valid Coupon (If 40 < total amount 400) - 10euros -// * -// * @covers Thelia\Coupon\CouponManager::getDiscount -// */ -// public function testGetDiscountOneCoupon() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// /** @var CouponInterface $coupon */ -// $coupon = self::generateValidCoupon(); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter(array($coupon), $cartTotalPrice, $checkoutTotalPrice); -// -// $couponManager = new CouponManager($stubCouponBaseAdapter); -// $discount = $couponManager->getDiscount(); -// -// $expected = 10.00; -// $actual = $discount; -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test getDiscount() behaviour -// * Entering : 1 valid Coupon (If 40 < total amount 400) - 10euros -// * 1 valid Coupon (If total amount > 20) - 15euros -// * -// * @covers Thelia\Coupon\CouponManager::getDiscount -// */ -// public function testGetDiscountTwoCoupon() -// { -// $adapter = new BaseAdapter(); -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// /** @var CouponInterface $coupon1 */ -// $coupon1 = self::generateValidCoupon(); -// $rule1 = new AvailableForTotalAmount( -// $adapter, array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// Operators::SUPERIOR, -// new PriceParam( -// $adapter, 40.00, 'EUR' -// ) -// ) -// ) -// ); -// $rules = new ConditionCollection(array($rule1)); -// /** @var CouponInterface $coupon2 */ -// $coupon2 = $this->generateValidCoupon('XMAS2', null, null, null, 15.00, null, null, $rules); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter(array($coupon1, $coupon2), $cartTotalPrice, $checkoutTotalPrice); -// -// $couponManager = new CouponManager($stubCouponBaseAdapter); -// $discount = $couponManager->getDiscount(); -// -// $expected = 25.00; -// $actual = $discount; -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test getDiscount() behaviour -// * For a Cart of 21euros -// * Entering : 1 valid Coupon (If total amount > 20) - 30euros -// * -// * @covers Thelia\Coupon\CouponManager::getDiscount -// */ -// public function testGetDiscountAlwaysInferiorToPrice() -// { -// $adapter = new BaseAdapter(); -// $cartTotalPrice = 21.00; -// $checkoutTotalPrice = 26.00; -// -// $rule1 = new AvailableForTotalAmount( -// $adapter, array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// Operators::SUPERIOR, -// new PriceParam( -// $adapter, 20.00, 'EUR' -// ) -// ) -// ) -// ); -// $rules = new ConditionCollection(array($rule1)); -// /** @var CouponInterface $coupon */ -// $coupon = $this->generateValidCoupon('XMAS2', null, null, null, 30.00, null, null, $rules); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter(array($coupon), $cartTotalPrice, $checkoutTotalPrice); -// -// $couponManager = new CouponManager($stubCouponBaseAdapter); -// $discount = $couponManager->getDiscount(); -// -// $expected = 21.00; -// $actual = $discount; -// $this->assertEquals($expected, $actual); -// } -// -// -// /** -// * Check if removing postage on discout is working -// * @covers Thelia\Coupon\CouponManager::isCouponRemovingPostage -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testIsCouponRemovingPostage() -// { -// $adapter = new BaseAdapter(); -// $cartTotalPrice = 21.00; -// $checkoutTotalPrice = 27.00; -// -// $rule1 = new AvailableForTotalAmount( -// $adapter, array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// Operators::SUPERIOR, -// new PriceParam( -// $adapter, 20.00, 'EUR' -// ) -// ) -// ) -// ); -// $rules = new ConditionCollection(array($rule1)); -// /** @var CouponInterface $coupon */ -// $coupon = $this->generateValidCoupon('XMAS2', null, null, null, 30.00, null, null, $rules, null, true); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter(array($coupon), $cartTotalPrice, $checkoutTotalPrice); -// -// $couponManager = new CouponManager($stubCouponBaseAdapter); -// $discount = $couponManager->getDiscount(); -// -// $expected = 21.00; -// $actual = $discount; -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon not cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponNotCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false); -// -// $coupons = array($couponCumulative1); -// -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = $coupons; -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite there is only once'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon(null, null, null, null, null, null, null, null, true); -// -// $coupons = array($couponCumulative1); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = $coupons; -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite there is only once'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative -// * 1 Coupon cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationTwoCouponCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = $coupons; -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite both Coupon can be accumulated'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative -// * 1 Coupon non cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponCumulativeOneNonCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, false); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative2); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite both Coupon can be accumulated'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon non cumulative -// * 1 Coupon cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponNonCumulativeOneCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, false); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative2); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite both Coupon can be accumulated'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon non cumulative -// * 1 Coupon non cumulative -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationTwoCouponNonCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, false); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, false); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative2); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Array Sorted despite both Coupon can be accumulated'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative expired -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponCumulativeExpired() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, new \DateTime(), null, true); -// -// $coupons = array($couponCumulative1); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array(); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon expired ignored'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative expired -// * 1 Coupon cumulative expired -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationTwoCouponCumulativeExpired() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, new \DateTime(), null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, new \DateTime(), null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array(); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon expired ignored'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative expired -// * 1 Coupon cumulative valid -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponCumulativeExpiredOneNonExpired() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, new \DateTime(), null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative2); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon expired ignored'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative valid -// * 1 Coupon cumulative expired -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationOneCouponCumulativeNonExpiredOneExpired() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, new \DateTime(), null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative1); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon expired ignored'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative valid -// * 1 Coupon cumulative valid -// * 1 Coupon cumulative valid -// * 1 Coupon cumulative valid -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationFourCouponCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, true); -// $couponCumulative3 = $this->generateValidCoupon('XMAS3', null, null, null, null, null, null, null, true); -// $couponCumulative4 = $this->generateValidCoupon('XMAS4', null, null, null, null, null, null, null, true); -// -// $coupons = array($couponCumulative1, $couponCumulative2, $couponCumulative3, $couponCumulative4); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = $coupons; -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon cumulative ignored'); -// } -// -// /** -// * Testing how multiple Coupon behaviour -// * Entering 1 Coupon cumulative valid -// * 1 Coupon cumulative valid -// * 1 Coupon cumulative valid -// * 1 Coupon non cumulative valid -// * -// * @covers Thelia\Coupon\CouponManager::sortCoupons -// */ -// public function testCouponCumulationThreeCouponCumulativeOneNonCumulative() -// { -// $cartTotalPrice = 100.00; -// $checkoutTotalPrice = 120.00; -// -// // Given -// /** @var CouponInterface $coupon */ -// $couponCumulative1 = $this->generateValidCoupon('XMAS1', null, null, null, null, null, null, null, true); -// $couponCumulative2 = $this->generateValidCoupon('XMAS2', null, null, null, null, null, null, null, true); -// $couponCumulative3 = $this->generateValidCoupon('XMAS3', null, null, null, null, null, null, null, true); -// $couponCumulative4 = $this->generateValidCoupon('XMAS4', null, null, null, null, null, null, null, false); -// -// $coupons = array($couponCumulative1, $couponCumulative2, $couponCumulative3, $couponCumulative4); -// /** @var AdapterInterface $stubCouponBaseAdapter */ -// $stubCouponBaseAdapter = $this->generateFakeAdapter($coupons, $cartTotalPrice, $checkoutTotalPrice); -// -// // When -// $sortedCoupons = PhpUnitUtils::callMethod( -// new CouponManager($stubCouponBaseAdapter), -// 'sortCoupons', -// array($coupons) -// ); -// -// // Then -// $expected = array($couponCumulative4); -// $actual = $sortedCoupons; -// -// $this->assertSame($expected, $actual, 'Coupon cumulative ignored'); -// } -// -// -// /** -// * Generate valid CouponRuleInterfaces -// * -// * @return array Array of ConditionManagerInterface -// */ -// public static function generateValidRules() -// { -// $adapter = new BaseAdapter(); -// $rule1 = new AvailableForTotalAmount( -// $adapter, array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// Operators::SUPERIOR, -// new PriceParam( -// $adapter, 40.00, 'EUR' -// ) -// ) -// ) -// ); -// $rule2 = new AvailableForTotalAmount( -// $adapter, array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// Operators::INFERIOR, -// new PriceParam( -// $adapter, 400.00, 'EUR' -// ) -// ) -// ) -// ); -// $rules = new ConditionCollection(array($rule1, $rule2)); -// -// return $rules; -// } -// -// /** -// * Tears down the fixture, for example, closes a network connection. -// * This method is called after a test is executed. -// */ -// protected function tearDown() -// { -// } -// -// /** -// * Generate a fake Adapter -// * -// * @param array $coupons Coupons -// * @param float $cartTotalPrice Cart total price -// * @param float $checkoutTotalPrice Checkout total price -// * @param float $postagePrice Checkout postage price -// * -// * @return \PHPUnit_Framework_MockObject_MockObject -// */ -// public function generateFakeAdapter(array $coupons, $cartTotalPrice, $checkoutTotalPrice, $postagePrice = 6.00) -// { -// $stubCouponBaseAdapter = $this->getMock( -// 'Thelia\Coupon\BaseAdapter', -// array( -// 'getCurrentCoupons', -// 'getCartTotalPrice', -// 'getCheckoutTotalPrice', -// 'getCheckoutPostagePrice' -// ), -// array() -// ); -// -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('getCurrentCoupons') -// ->will($this->returnValue(($coupons))); -// -// // Return Cart product amount = $cartTotalPrice euros -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('getCartTotalPrice') -// ->will($this->returnValue($cartTotalPrice)); -// -// // Return Checkout amount = $checkoutTotalPrice euros -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('getCheckoutTotalPrice') -// ->will($this->returnValue($checkoutTotalPrice)); -// -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('getCheckoutPostagePrice') -// ->will($this->returnValue($postagePrice)); -// -// return $stubCouponBaseAdapter; -// } -// -// /** -// * Generate valid CouponInterface -// * -// * @param string $code Coupon Code -// * @param string $title Coupon Title -// * @param string $shortDescription Coupon short -// * description -// * @param string $description Coupon description -// * @param float $amount Coupon discount -// * @param bool $isEnabled Is Coupon enabled -// * @param \DateTime $expirationDate Coupon expiration date -// * @param ConditionCollection $rules Coupon rules -// * @param bool $isCumulative If is cumulative -// * @param bool $isRemovingPostage If is removing postage -// * @param bool $isAvailableOnSpecialOffers If is available on -// * special offers or not -// * @param int $maxUsage How many time a Coupon -// * can be used -// * -// * @return CouponInterface -// */ -// public static function generateValidCoupon( -// $code = null, -// $title = null, -// $shortDescription = null, -// $description = null, -// $amount = null, -// $isEnabled = null, -// $expirationDate = null, -// $rules = null, -// $isCumulative = null, -// $isRemovingPostage = null, -// $isAvailableOnSpecialOffers = null, -// $maxUsage = null -// ) { -// $adapter = new BaseAdapter(); -// if ($code === null) { -// $code = self::VALID_CODE; -// } -// if ($title === null) { -// $title = self::VALID_TITLE; -// } -// if ($shortDescription === null) { -// $shortDescription = self::VALID_SHORT_DESCRIPTION; -// } -// if ($description === null) { -// $description = self::VALID_DESCRIPTION; -// } -// if ($amount === null) { -// $amount = 10.00; -// } -// if ($isEnabled === null) { -// $isEnabled = true; -// } -// if ($isCumulative === null) { -// $isCumulative = true; -// } -// if ($isRemovingPostage === null) { -// $isRemovingPostage = false; -// } -// if ($isAvailableOnSpecialOffers === null) { -// $isAvailableOnSpecialOffers = true; -// } -// if ($maxUsage === null) { -// $maxUsage = 40; -// } -// -// if ($expirationDate === null) { -// $expirationDate = new \DateTime(); -// $expirationDate->setTimestamp(strtotime("today + 2 months")); -// } -// -// $coupon = new RemoveXAmount($adapter, $code, $title, $shortDescription, $description, $amount, $isCumulative, $isRemovingPostage, $isAvailableOnSpecialOffers, $isEnabled, $maxUsage, $expirationDate); -// -// if ($rules === null) { -// $rules = self::generateValidRules(); -// } -// -// $coupon->setRules($rules); -// -// return $coupon; -// } } diff --git a/core/lib/Thelia/Tests/Coupon/CouponRuleCollectionTest.php b/core/lib/Thelia/Tests/Coupon/CouponRuleCollectionTest.php index 2b19ba130..0745e9b98 100644 --- a/core/lib/Thelia/Tests/Coupon/CouponRuleCollectionTest.php +++ b/core/lib/Thelia/Tests/Coupon/CouponRuleCollectionTest.php @@ -23,11 +23,6 @@ namespace Thelia\Coupon; -use Thelia\Constraint\Validator\PriceParam; -use Thelia\Constraint\Validator\RuleValidator; -use Thelia\Constraint\Rule\AvailableForTotalAmount; -use Thelia\Constraint\Rule\Operators; - /** * Created by JetBrains PhpStorm. * Date: 8/19/13 @@ -48,39 +43,4 @@ class CouponRuleCollectionTest extends \PHPUnit_Framework_TestCase 'This test has not been implemented yet.' ); } -// /** -// * -// */ -// public function testRuleSerialisation() -// { -//// $rule1 = new AvailableForTotalAmount( -//// , array( -//// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -//// Operators::SUPERIOR, -//// new PriceParam( -//// , 40.00, 'EUR' -//// ) -//// ) -//// ) -//// ); -//// $rule2 = new AvailableForTotalAmount( -//// , array( -//// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -//// Operators::INFERIOR, -//// new PriceParam( -//// , 400.00, 'EUR' -//// ) -//// ) -//// ) -//// ); -//// $rules = new ConditionCollection(array($rule1, $rule2)); -//// -//// $serializedRules = base64_encode(serialize($rules)); -//// $unserializedRules = unserialize(base64_decode($serializedRules)); -//// -//// $expected = $rules; -//// $actual = $unserializedRules; -//// -//// $this->assertEquals($expected, $actual); -// } } diff --git a/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountTest.php index de739bf90..ee8ed3068 100644 --- a/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountTest.php +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXAmountTest.php @@ -23,10 +23,6 @@ namespace Thelia\Coupon; -use Thelia\Constraint\Validator\PriceParam; -use Thelia\Constraint\Validator\RuleValidator; -use Thelia\Constraint\Rule\Operators; -use Thelia\Coupon\Type\RemoveXAmountManager; //require_once '../CouponManagerTest.php'; @@ -43,341 +39,27 @@ use Thelia\Coupon\Type\RemoveXAmountManager; */ class RemoveXAmountTest extends \PHPUnit_Framework_TestCase { + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + } + public function testSomething() { // Stop here and mark this test as incomplete. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This coupon has not been implemented yet.' ); } -// /** -// * Sets up the fixture, for example, opens a network connection. -// * This method is called before a test is executed. -// */ -// protected function setUp() -// { -// -// } -// -// /** -// * Test if a Coupon is well displayed -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getCode -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getTitle -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getShortDescription -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getDescription -// * -// */ -// public function testDisplay() -// { -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, true, true); -// -// $expected = CouponManagerTest::VALID_CODE; -// $actual = $coupon->getCode(); -// $this->assertEquals($expected, $actual); -// -// $expected = CouponManagerTest::VALID_TITLE; -// $actual = $coupon->getTitle(); -// $this->assertEquals($expected, $actual); -// -// $expected = CouponManagerTest::VALID_SHORT_DESCRIPTION; -// $actual = $coupon->getShortDescription(); -// $this->assertEquals($expected, $actual); -// -// $expected = CouponManagerTest::VALID_DESCRIPTION; -// $actual = $coupon->getDescription(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test if a Coupon can be Cumulative -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::isCumulative -// * -// */ -// public function testIsCumulative() -// { -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, true, true); -// -// $actual = $coupon->isCumulative(); -// $this->assertTrue($actual); -// } -// -// /** -// * Test if a Coupon can be non cumulative -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::isCumulative -// * -// */ -// public function testIsNotCumulative() -// { -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $actual = $coupon->isCumulative(); -// $this->assertFalse($actual); -// } -// -// -// /** -// * Test if a Coupon can remove postage -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::isRemovingPostage -// * -// */ -// public function testIsRemovingPostage() -// { -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, true, true); -// -// $actual = $coupon->isRemovingPostage(); -// $this->assertTrue($actual); -// } -// -// /** -// * Test if a Coupon won't remove postage if not set to -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::isRemovingPostage -// */ -// public function testIsNotRemovingPostage() -// { -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $actual = $coupon->isRemovingPostage(); -// $this->assertFalse($actual); -// } -// -// -// /** -// * Test if a Coupon has the effect expected (discount 10euros) -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// */ -// public function testGetEffect() -// { -// $adapter = new BaseAdapter(); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $expected = 10; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon rule setter -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::setRules -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getRules -// */ -// public function testSetRulesValid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 20.00 -// ); -// $rule1 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 100.23 -// ); -// $rule2 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR, -// 421.23 -// ); -// -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0, $rule1, $rule2))); -// -// // Then -// $expected = 3; -// $this->assertCount($expected, $coupon->getRules()->getRules()); -// } -// -// /** -// * Test Coupon rule setter -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::setRules -// * @expectedException \Thelia\Exception\InvalidConditionException -// * -// */ -// public function testSetRulesInvalid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 20.00 -// ); -// $rule1 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 100.23 -// ); -// $rule2 = $this; -// -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0, $rule1, $rule2))); -// } -// -// /** -// * Test Coupon effect for rule Total Amount < 400 -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountInferiorTo400Valid() -// { -// // Given -// $adapter = new BaseAdapter(); -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 400.00 -// ); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 10.00; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount <= 400 -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountInferiorOrEqualTo400Valid() -// { -// // Given -// $adapter = new BaseAdapter(); -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR_OR_EQUAL, -// 400.00 -// ); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 10.00; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount == 400 -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountEqualTo400Valid() -// { -// // Given -// $adapter = new BaseAdapter(); -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 400.00 -// ); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 10.00; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount >= 400 -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountSuperiorOrEqualTo400Valid() -// { -// // Given -// $adapter = new BaseAdapter(); -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR_OR_EQUAL, -// 400.00 -// ); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 10.00; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount > 400 -// * -// * @covers Thelia\Coupon\type\RemoveXAmountManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountSuperiorTo400Valid() -// { -// // Given -// $adapter = new BaseAdapter(); -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR, -// 400.00 -// ); -// $coupon = CouponManagerTest::generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 10.00; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// -// -// /** -// * Tears down the fixture, for example, closes a network connection. -// * This method is called after a test is executed. -// */ -// protected function tearDown() -// { -// } -// -// /** -// * Generate valid rule AvailableForTotalAmount -// * according to given operator and amount -// * -// * @param string $operator Operators::CONST -// * @param float $amount Amount with 2 decimals -// * -// * @return AvailableForTotalAmount -// */ -// protected function generateValidRuleAvailableForTotalAmountOperatorTo($operator, $amount) -// { -// $adapter = new BaseAdapter(); -// $validators = array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// $operator, -// new PriceParam( -// $adapter, -// $amount, -// 'EUR' -// ) -// ) -// ); -// -// return new AvailableForTotalAmount($adapter, $validators); -// } + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } } diff --git a/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php index b1b012fb3..bbb0c24a3 100644 --- a/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php +++ b/core/lib/Thelia/Tests/Coupon/Type/RemoveXPercentTest.php @@ -24,11 +24,6 @@ namespace Thelia\Coupon; use PHPUnit_Framework_TestCase; -use Thelia\Constraint\Rule\Operators; -use Thelia\Constraint\Validator\PriceParam; -use Thelia\Constraint\Validator\RuleValidator; -use Thelia\Coupon\Type\CouponInterface; -use Thelia\Coupon\Type\RemoveXPercentManager; //require_once '../CouponManagerTest.php'; @@ -46,412 +41,27 @@ use Thelia\Coupon\Type\RemoveXPercentManager; class RemoveXPercentTest extends \PHPUnit_Framework_TestCase { + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + } + public function testSomething() { - // Stop here and mark this test as incomplete. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This coupon has not been implemented yet.' ); } -// /** -// * Sets up the fixture, for example, opens a network connection. -// * This method is called before a test is executed. -// */ -// protected function setUp() -// { -// } -// -// /** -// * Test if a Coupon can be Cumulative -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::isCumulative -// * -// */ -// public function testIsCumulative() -// { -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, true, true); -// -// $actual = $coupon->isCumulative(); -// $this->assertTrue($actual); -// } -// -// /** -// * Test if a Coupon can be non cumulative -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::isCumulative -// * -// */ -// public function testIsNotCumulative() -// { -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $actual = $coupon->isCumulative(); -// $this->assertFalse($actual); -// } -// -// -// /** -// * Test if a Coupon can remove postage -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::isRemovingPostage -// * -// */ -// public function testIsRemovingPostage() -// { -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, true, true); -// -// $actual = $coupon->isRemovingPostage(); -// $this->assertTrue($actual); -// } -// -// /** -// * Test if a Coupon won't remove postage if not set to -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::isRemovingPostage -// */ -// public function testIsNotRemovingPostage() -// { -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $actual = $coupon->isRemovingPostage(); -// $this->assertFalse($actual); -// } -// -// -// /** -// * Test if a Coupon has the effect expected (discount 10euros) -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// */ -// public function testGetEffect() -// { -// $adapter = $this->generateFakeAdapter(245); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// $expected = 24.50; -// $actual = $coupon->getDiscount($adapter); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon rule setter -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::setRules -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getRules -// */ -// public function testSetRulesValid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 20.00 -// ); -// $rule1 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 100.23 -// ); -// $rule2 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR, -// 421.23 -// ); -// -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0, $rule1, $rule2))); -// -// // Then -// $expected = 3; -// $this->assertCount($expected, $coupon->getRules()->getRules()); -// } -// -// /** -// * Test Coupon rule setter -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::setRules -// * @expectedException \Thelia\Exception\InvalidConditionException -// * -// */ -// public function testSetRulesInvalid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 20.00 -// ); -// $rule1 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 100.23 -// ); -// $rule2 = $this; -// -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0, $rule1, $rule2))); -// } -// -// /** -// * Test Coupon effect for rule Total Amount < 400 -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountInferiorTo400Valid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR, -// 400.00 -// ); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 24.50; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount <= 400 -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountInferiorOrEqualTo400Valid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::INFERIOR_OR_EQUAL, -// 400.00 -// ); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 24.50; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount == 400 -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountEqualTo400Valid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::EQUAL, -// 400.00 -// ); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 24.50; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount >= 400 -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountSuperiorOrEqualTo400Valid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR_OR_EQUAL, -// 400.00 -// ); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 24.50; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Test Coupon effect for rule Total Amount > 400 -// * -// * @covers Thelia\Coupon\type\RemoveXPercentManager::getEffect -// * -// */ -// public function testGetEffectIfTotalAmountSuperiorTo400Valid() -// { -// // Given -// $rule0 = $this->generateValidRuleAvailableForTotalAmountOperatorTo( -// Operators::SUPERIOR, -// 400.00 -// ); -// $coupon = $this->generateValidCoupon(null, null, null, null, null, null, null, null, false, false); -// -// // When -// $coupon->setRules(new ConditionCollection(array($rule0))); -// -// // Then -// $expected = 24.50; -// $actual = $coupon->getDiscount(); -// $this->assertEquals($expected, $actual); -// } -// -// /** -// * Generate valid CouponInterface -// * -// * @param string $code Coupon Code -// * @param string $title Coupon Title -// * @param string $shortDescription Coupon short -// * description -// * @param string $description Coupon description -// * @param float $amount Coupon discount -// * @param bool $isEnabled Is Coupon enabled -// * @param \DateTime $expirationDate Coupon expiration date -// * @param ConditionCollection $rules Coupon rules -// * @param bool $isCumulative If is cumulative -// * @param bool $isRemovingPostage If is removing postage -// * @param bool $isAvailableOnSpecialOffers If is available on -// * special offers or not -// * @param int $maxUsage How many time a Coupon -// * can be used -// * -// * @return CouponInterface -// */ -// public function generateValidCoupon( -// $code = null, -// $title = null, -// $shortDescription = null, -// $description = null, -// $percent = null, -// $isEnabled = null, -// $expirationDate = null, -// $rules = null, -// $isCumulative = null, -// $isRemovingPostage = null, -// $isAvailableOnSpecialOffers = null, -// $maxUsage = null -// ) { -// $adapter = $this->generateFakeAdapter(245); -// -// if ($code === null) { -// $code = CouponManagerTest::VALID_CODE; -// } -// if ($title === null) { -// $title = CouponManagerTest::VALID_TITLE; -// } -// if ($shortDescription === null) { -// $shortDescription = CouponManagerTest::VALID_SHORT_DESCRIPTION; -// } -// if ($description === null) { -// $description = CouponManagerTest::VALID_DESCRIPTION; -// } -// if ($percent === null) { -// $percent = 10.00; -// } -// if ($isEnabled === null) { -// $isEnabled = true; -// } -// if ($isCumulative === null) { -// $isCumulative = true; -// } -// if ($isRemovingPostage === null) { -// $isRemovingPostage = false; -// } -// if ($isAvailableOnSpecialOffers === null) { -// $isAvailableOnSpecialOffers = true; -// } -// if ($maxUsage === null) { -// $maxUsage = 40; -// } -// -// if ($expirationDate === null) { -// $expirationDate = new \DateTime(); -// $expirationDate->setTimestamp(strtotime("today + 2 months")); -// } -// -// $coupon = new RemoveXPercent($adapter, $code, $title, $shortDescription, $description, $percent, $isCumulative, $isRemovingPostage, $isAvailableOnSpecialOffers, $isEnabled, $maxUsage, $expirationDate); -// -// if ($rules === null) { -// $rules = CouponManagerTest::generateValidRules(); -// } -// -// $coupon->setRules($rules); -// -// return $coupon; -// } -// -// -// /** -// * Generate valid rule AvailableForTotalAmount -// * according to given operator and amount -// * -// * @param string $operator Operators::CONST -// * @param float $amount Amount with 2 decimals -// * -// * @return AvailableForTotalAmount -// */ -// protected function generateValidRuleAvailableForTotalAmountOperatorTo($operator, $amount) -// { -// $adapter = new BaseAdapter(); -// $validators = array( -// AvailableForTotalAmount::PARAM1_PRICE => new RuleValidator( -// $operator, -// new PriceParam( -// $adapter, -// $amount, -// 'EUR' -// ) -// ) -// ); -// -// return new AvailableForTotalAmount($adapter, $validators); -// } -// -// /** -// * Generate a fake Adapter -// * -// * @param float $cartTotalPrice Cart total price -// * -// * @return \PHPUnit_Framework_MockObject_MockObject -// */ -// public function generateFakeAdapter($cartTotalPrice) -// { -// $stubCouponBaseAdapter = $this->getMock( -// 'Thelia\Coupon\BaseAdapter', -// array( -// 'getCartTotalPrice' -// ), -// array() -// ); -// -// $stubCouponBaseAdapter->expects($this->any()) -// ->method('getCartTotalPrice') -// ->will($this->returnValue(($cartTotalPrice))); -// -// return $stubCouponBaseAdapter; -// } -// -// /** -// * Tears down the fixture, for example, closes a network connection. -// * This method is called after a test is executed. -// */ -// protected function tearDown() -// { -// } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } } diff --git a/core/lib/Thelia/Tests/Tools/FileManagerTest.php b/core/lib/Thelia/Tests/Tools/FileManagerTest.php index 0b8e2f9de..3ad898ef2 100644 --- a/core/lib/Thelia/Tests/Tools/FileManagerTest.php +++ b/core/lib/Thelia/Tests/Tools/FileManagerTest.php @@ -33,7 +33,7 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase public function testCopyUploadedFile() { $this->markTestIncomplete( - 'Mock issue' + 'This test has not been implemented yet : Mock issue' ); $stubTranslator = $this->getMockBuilder('\Thelia\Core\Translation\Translator') @@ -112,7 +112,7 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase public function testCopyUploadedFileExceptionImageException() { $this->markTestIncomplete( - 'Mock issue' + 'This test has not been implemented yet : Mock issue' ); $stubTranslator = $this->getMockBuilder('\Thelia\Core\Translation\Translator') diff --git a/core/lib/Thelia/Tools/NumberFormat.php b/core/lib/Thelia/Tools/NumberFormat.php new file mode 100644 index 000000000..2c49a2751 --- /dev/null +++ b/core/lib/Thelia/Tools/NumberFormat.php @@ -0,0 +1,52 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Tools; + +use Symfony\Component\HttpFoundation\Request; + +class NumberFormat +{ + protected $request; + + public function __construct(Request $request) + { + $this->request = $request; + } + + public static function getInstance(Request $request) + { + return new NumberFormat($request); + } + + public function format($number, $decimals = null, $decPoint = null, $thousandsSep = null) + { + $lang = $this->request->getSession()->getLang(); + + if ($decimals == null) $decimals = $lang->getDecimals(); + if ($decPoint == null) $decPoint = $lang->getDecimalSeparator(); + if ($thousandsSep == null) $thousandsSep = $lang->getThousandsSeparator(); + + return number_format($number, $decimals, $decPoint, $thousandsSep); + } +} \ No newline at end of file diff --git a/documentation/api/namespaces/Thelia.Condition.Implementation.html b/documentation/api/namespaces/Thelia.Condition.Implementation.html new file mode 100644 index 000000000..412b9c6bc --- /dev/null +++ b/documentation/api/namespaces/Thelia.Condition.Implementation.html @@ -0,0 +1,3004 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\ConditionImplementation

+ + + + +

Classes

+ + + + + + + + + + + + + +
MatchForTotalAmountManagerCreated by JetBrains PhpStorm.
MatchForEveryoneManagerCreated by JetBrains PhpStorm.
MatchForXArticlesManagerCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Condition.html b/documentation/api/namespaces/Thelia.Condition.html new file mode 100644 index 000000000..336f5de36 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Condition.html @@ -0,0 +1,3023 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaCondition

+ +

Namespaces

+ + + + +
Implementation
+ + +

Interfaces

+ + + + + +
ConditionManagerInterfaceCreated by JetBrains PhpStorm.
+ +

Classes

+ + + + + + + + + + + + + + + + + + + + + +
SerializableConditionCreated by JetBrains PhpStorm.
ConditionManagerAbstractCreated by JetBrains PhpStorm.
OperatorsCreated by JetBrains PhpStorm.
ConditionEvaluatorCreated by JetBrains PhpStorm.
ConditionFactoryCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Address.html b/documentation/api/namespaces/Thelia.Core.Event.Address.html new file mode 100644 index 000000000..85e438085 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Address.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventAddress

+ + + + +

Classes

+ + + + + + + + + +
AddressCreateOrUpdateEventClass AddressCreateOrUpdateEvent
AddressEventClass AddressEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Administrator.html b/documentation/api/namespaces/Thelia.Core.Event.Administrator.html new file mode 100644 index 000000000..5477c3c0b --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Administrator.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventAdministrator

+ + + + +

Classes

+ + + + + +
AdministratorEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Area.html b/documentation/api/namespaces/Thelia.Core.Event.Area.html new file mode 100644 index 000000000..0b7fe9d73 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Area.html @@ -0,0 +1,3022 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventArea

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AreaEventClass AreaEvent
AreaDeleteEventClass AreaDeleteEvent
AreaRemoveCountryEventClass AreaRemoveCountryEvent
AreaAddCountryEventClass AreaAddCountryEvent
AreaUpdatePostageEventClass AreaUpdatePostageEvent
AreaUpdateEventClass AreaUpdateEvent
AreaCreateEventClass AreaCreateEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Attribute.html b/documentation/api/namespaces/Thelia.Core.Event.Attribute.html new file mode 100644 index 000000000..32bea826d --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Attribute.html @@ -0,0 +1,3026 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventAttribute

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDeleteEventClass thrown on Thelia.action event
AttributeAvUpdateEventClass thrown on Thelia.action event
AttributeCreateEventClass thrown on Thelia.action event
AttributeAvDeleteEventClass thrown on Thelia.action event
AttributeAvCreateEventClass thrown on Thelia.action event
AttributeEventClass thrown on Thelia.action event
AttributeUpdateEventClass thrown on Thelia.action event
AttributeAvEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Cache.html b/documentation/api/namespaces/Thelia.Core.Event.Cache.html new file mode 100644 index 000000000..537952412 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Cache.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCache

+ + + + +

Classes

+ + + + + +
CacheEventClass CacheEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Cart.html b/documentation/api/namespaces/Thelia.Core.Event.Cart.html new file mode 100644 index 000000000..b97bd4bfc --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Cart.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCart

+ + + + +

Classes

+ + + + + + + + + +
CartEventClass thrown on Thelia.action event
CartItemEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Category.html b/documentation/api/namespaces/Thelia.Core.Event.Category.html new file mode 100644 index 000000000..97f8a08d1 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Category.html @@ -0,0 +1,3026 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCategory

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryAssociatedContentEventClass thrown on Thelia.action event
CategoryCreateEventClass thrown on Thelia.action event
CategoryAddContentEventClass thrown on Thelia.action event
CategoryToggleVisibilityEventClass thrown on Thelia.action event
CategoryDeleteEventClass thrown on Thelia.action event
CategoryUpdateEventClass thrown on Thelia.action event
CategoryEventClass thrown on Thelia.action event
CategoryDeleteContentEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Config.html b/documentation/api/namespaces/Thelia.Core.Event.Config.html new file mode 100644 index 000000000..c9a847d23 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Config.html @@ -0,0 +1,3010 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventConfig

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + +
ConfigDeleteEventClass thrown on Thelia.action event
ConfigEventClass thrown on Thelia.action event
ConfigUpdateEventClass thrown on Thelia.action event
ConfigCreateEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Content.html b/documentation/api/namespaces/Thelia.Core.Event.Content.html new file mode 100644 index 000000000..28c00902c --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Content.html @@ -0,0 +1,3022 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventContent

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ContentUpdateEventClass ContentUpdateEvent
ContentToggleVisibilityEventClass ContentToggleVisibilityEvent
ContentDeleteEventClass ContentDeleteEvent
ContentCreateEventClass ContentCreateEvent
ContentEventClass ContentEvent
ContentAddFolderEventClass ContentAddFolderEvent
ContentRemoveFolderEventClass ContentRemoveFolderEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Country.html b/documentation/api/namespaces/Thelia.Core.Event.Country.html new file mode 100644 index 000000000..6e73eddea --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Country.html @@ -0,0 +1,3014 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCountry

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + +
CountryEventClass CountryEvent
CountryUpdateEventClass CountryUpdateEvent
CountryCreateEventClass CountryCreateEvent
CountryDeleteEventClass CountryDeleteEvent
CountryToggleDefaultEventClass CountryToggleDefaultEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Coupon.html b/documentation/api/namespaces/Thelia.Core.Event.Coupon.html new file mode 100644 index 000000000..7bf70f379 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Coupon.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCoupon

+ + + + +

Classes

+ + + + + + + + + +
CouponCreateOrUpdateEventCreated by JetBrains PhpStorm.
CouponConsumeEventCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Currency.html b/documentation/api/namespaces/Thelia.Core.Event.Currency.html new file mode 100644 index 000000000..5530269e8 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Currency.html @@ -0,0 +1,3010 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCurrency

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + +
CurrencyCreateEventClass thrown on Thelia.action event
CurrencyDeleteEventClass thrown on Thelia.action event
CurrencyEventClass thrown on Thelia.action event
CurrencyUpdateEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Customer.html b/documentation/api/namespaces/Thelia.Core.Event.Customer.html new file mode 100644 index 000000000..1edb2b3c6 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Customer.html @@ -0,0 +1,3006 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventCustomer

+ + + + +

Classes

+ + + + + + + + + + + + + +
CustomerCreateOrUpdateEventClass CustomerCreateOrUpdateEvent
CustomerLoginEventClass thrown on Thelia.action event
CustomerEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Document.html b/documentation/api/namespaces/Thelia.Core.Event.Document.html new file mode 100644 index 000000000..bf052a081 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Document.html @@ -0,0 +1,3006 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventDocument

+ + + + +

Classes

+ + + + + + + + + + + + + +
DocumentDeleteEventCreated by JetBrains PhpStorm.
DocumentCreateOrUpdateEventCreated by JetBrains PhpStorm.
DocumentEventClass DocumentEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Feature.html b/documentation/api/namespaces/Thelia.Core.Event.Feature.html new file mode 100644 index 000000000..b59bbaa43 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Feature.html @@ -0,0 +1,3026 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventFeature

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAvCreateEventClass thrown on Thelia.action event
FeatureDeleteEventClass thrown on Thelia.action event
FeatureAvEventClass thrown on Thelia.action event
FeatureCreateEventClass thrown on Thelia.action event
FeatureAvDeleteEventClass thrown on Thelia.action event
FeatureEventClass thrown on Thelia.action event
FeatureUpdateEventClass thrown on Thelia.action event
FeatureAvUpdateEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.FeatureProduct.html b/documentation/api/namespaces/Thelia.Core.Event.FeatureProduct.html new file mode 100644 index 000000000..babe3b9a8 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.FeatureProduct.html @@ -0,0 +1,3006 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventFeatureProduct

+ + + + +

Classes

+ + + + + + + + + + + + + +
FeatureProductDeleteEventClass thrown on Thelia.action event
FeatureProductUpdateEventClass thrown on Thelia.action event
FeatureProductEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Folder.html b/documentation/api/namespaces/Thelia.Core.Event.Folder.html new file mode 100644 index 000000000..22fd37f5d --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Folder.html @@ -0,0 +1,3014 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventFolder

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + +
FolderEventClass FolderEvent
FolderCreateEventClass FolderCreateEvent
FolderToggleVisibilityEventClass FolderToggleVisibilityEvent
FolderUpdateEventClass FolderUpdateEvent
FolderDeleteEventClass FolderDeleteEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Image.html b/documentation/api/namespaces/Thelia.Core.Event.Image.html new file mode 100644 index 000000000..1d6482d7e --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Image.html @@ -0,0 +1,3006 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventImage

+ + + + +

Classes

+ + + + + + + + + + + + + +
ImageCreateOrUpdateEventCreated by JetBrains PhpStorm.
ImageEventClass thrown on Thelia.action event
ImageDeleteEventCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Lang.html b/documentation/api/namespaces/Thelia.Core.Event.Lang.html new file mode 100644 index 000000000..2e46a5900 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Lang.html @@ -0,0 +1,3018 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventLang

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + +
LangEventClass LangEvent
LangUpdateEventClass LangUpdateEvent
LangToggleDefaultEventClass LangToggleDefaultEvent
LangDefaultBehaviorEventClass LangDefaultBehaviorEvent
LangCreateEventClass LangCreateEvent
LangDeleteEventClass LangDeleteEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Message.html b/documentation/api/namespaces/Thelia.Core.Event.Message.html new file mode 100644 index 000000000..78e1a11a9 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Message.html @@ -0,0 +1,3010 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventMessage

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + +
MessageCreateEventClass thrown on Thelia.action event
MessageEventClass thrown on Thelia.action event
MessageUpdateEventClass thrown on Thelia.action event
MessageDeleteEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Module.html b/documentation/api/namespaces/Thelia.Core.Event.Module.html new file mode 100644 index 000000000..b9382f595 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Module.html @@ -0,0 +1,3006 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventModule

+ + + + +

Classes

+ + + + + + + + + + + + + +
ModuleEventClass ModuleEvent
ModuleToggleActivationEventClass ModuleToggleActivationEvent
ModuleDeleteEventClass ModuleDeleteEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Newsletter.html b/documentation/api/namespaces/Thelia.Core.Event.Newsletter.html new file mode 100644 index 000000000..42ec24f1d --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Newsletter.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventNewsletter

+ + + + +

Classes

+ + + + + +
NewsletterEventClass NewsletterEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Order.html b/documentation/api/namespaces/Thelia.Core.Event.Order.html new file mode 100644 index 000000000..dc4aef4ba --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Order.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventOrder

+ + + + +

Classes

+ + + + + + + + + +
OrderEventClass thrown on Thelia.action event
OrderAddressEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Product.html b/documentation/api/namespaces/Thelia.Core.Event.Product.html new file mode 100644 index 000000000..618255f6f --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Product.html @@ -0,0 +1,3054 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventProduct

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProductAddContentEventClass thrown on Thelia.action event
ProductDeleteAccessoryEventClass thrown on Thelia.action event
ProductUpdateEventClass thrown on Thelia.action event
ProductAssociatedContentEventClass thrown on Thelia.action event
ProductEventClass thrown on Thelia.action event
ProductToggleVisibilityEventClass thrown on Thelia.action event
ProductDeleteContentEventClass thrown on Thelia.action event
ProductCreateCombinationEventClass thrown on Thelia.action event
ProductDeleteCategoryEventClass thrown on Thelia.action event
ProductCreateEventClass thrown on Thelia.action event
ProductAddCategoryEventClass thrown on Thelia.action event
ProductSetTemplateEventClass thrown on Thelia.action event
ProductDeleteCombinationEventClass thrown on Thelia.action event
ProductAddAccessoryEventClass thrown on Thelia.action event
ProductDeleteEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Profile.html b/documentation/api/namespaces/Thelia.Core.Event.Profile.html new file mode 100644 index 000000000..38562f3b0 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Profile.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventProfile

+ + + + +

Classes

+ + + + + +
ProfileEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.ShippingZone.html b/documentation/api/namespaces/Thelia.Core.Event.ShippingZone.html new file mode 100644 index 000000000..e3417a629 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.ShippingZone.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventShippingZone

+ + + + +

Classes

+ + + + + + + + + +
ShippingZoneRemoveAreaEventClass ShippingZoneRemoveAreaEvent
ShippingZoneAddAreaEventClass ShippingZoneAddAreaEvent
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Tax.html b/documentation/api/namespaces/Thelia.Core.Event.Tax.html new file mode 100644 index 000000000..409ac7fff --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Tax.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventTax

+ + + + +

Classes

+ + + + + + + + + +
TaxRuleEventClass thrown on Thelia.action event
TaxEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Event.Template.html b/documentation/api/namespaces/Thelia.Core.Event.Template.html new file mode 100644 index 000000000..a47fbab4c --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Event.Template.html @@ -0,0 +1,3026 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\EventTemplate

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TemplateDeleteEventClass thrown on Thelia.action event
TemplateDeleteFeatureEventClass thrown on Thelia.action event
TemplateAddAttributeEventClass thrown on Thelia.action event
TemplateEventClass thrown on Thelia.action event
TemplateUpdateEventClass thrown on Thelia.action event
TemplateAddFeatureEventClass thrown on Thelia.action event
TemplateCreateEventClass thrown on Thelia.action event
TemplateDeleteAttributeEventClass thrown on Thelia.action event
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Form.Type.html b/documentation/api/namespaces/Thelia.Core.Form.Type.html new file mode 100644 index 000000000..b19103925 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Form.Type.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\FormType

+ + + + +

Classes

+ + + + + +
TheliaType
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Form.html b/documentation/api/namespaces/Thelia.Core.Form.html new file mode 100644 index 000000000..9f4f6b1a6 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Form.html @@ -0,0 +1,2995 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\CoreForm

+ +

Namespaces

+ + + + +
Type
+ + + +
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.HttpKernel.Exception.html b/documentation/api/namespaces/Thelia.Core.HttpKernel.Exception.html new file mode 100644 index 000000000..275ce7016 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.HttpKernel.Exception.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\HttpKernelException

+ + + + +

Classes

+ + + + + +
NotFountHttpExceptionClass NotFountHttpException
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.HttpKernel.html b/documentation/api/namespaces/Thelia.Core.HttpKernel.html new file mode 100644 index 000000000..e72d60eb3 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.HttpKernel.html @@ -0,0 +1,2995 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\CoreHttpKernel

+ +

Namespaces

+ + + + +
Exception
+ + + +
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Routing.html b/documentation/api/namespaces/Thelia.Core.Routing.html new file mode 100644 index 000000000..b2d8fe120 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Routing.html @@ -0,0 +1,2996 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\CoreRouting

+ + + + +

Classes

+ + + + + +
RewritingRouterClass RewritingRouter
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Security.Resource.html b/documentation/api/namespaces/Thelia.Core.Security.Resource.html new file mode 100644 index 000000000..f18ff28f4 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Security.Resource.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\SecurityResource

+ + + + +

Classes

+ + + + + +
AdminResourcesThis class contains all Thelia admin resources
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Security.Token.html b/documentation/api/namespaces/Thelia.Core.Security.Token.html new file mode 100644 index 000000000..3289a8674 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Security.Token.html @@ -0,0 +1,3002 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\SecurityToken

+ + + + +

Classes

+ + + + + + + + + +
TokenProvider
CookieTokenProvider
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Core.Template.Smarty.Exception.html b/documentation/api/namespaces/Thelia.Core.Template.Smarty.Exception.html new file mode 100644 index 000000000..fc8949e2a --- /dev/null +++ b/documentation/api/namespaces/Thelia.Core.Template.Smarty.Exception.html @@ -0,0 +1,3000 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\Core\Template\SmartyException

+ + + + +

Classes

+ + + + + +
SmartyPluginExceptionClass SmartyPluginException
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Coupon.Type.html b/documentation/api/namespaces/Thelia.Coupon.Type.html new file mode 100644 index 000000000..45f46f8e6 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Coupon.Type.html @@ -0,0 +1,3011 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\CouponType

+ + + +

Interfaces

+ + + + + +
CouponInterfaceCreated by JetBrains PhpStorm.
+ +

Classes

+ + + + + + + + + + + + + +
RemoveXAmountManagerCreated by JetBrains PhpStorm.
CouponAbstractCreated by JetBrains PhpStorm.
RemoveXPercentManagerCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Coupon.html b/documentation/api/namespaces/Thelia.Coupon.html new file mode 100644 index 000000000..68c1fd64b --- /dev/null +++ b/documentation/api/namespaces/Thelia.Coupon.html @@ -0,0 +1,3027 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaCoupon

+ +

Namespaces

+ + + + +
Type
+ + +

Interfaces

+ + + + + + + + + +
FacadeInterfaceCreated by JetBrains PhpStorm.
RuleOrganizerInterfaceCreated by JetBrains PhpStorm.
+ +

Classes

+ + + + + + + + + + + + + + + + + + + + + +
RuleOrganizerCreated by JetBrains PhpStorm.
CouponManagerCreated by JetBrains PhpStorm.
BaseFacadeCreated by JetBrains PhpStorm.
ConditionCollectionCreated by JetBrains PhpStorm.
CouponFactoryCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Form.Area.html b/documentation/api/namespaces/Thelia.Form.Area.html new file mode 100644 index 000000000..936864ca5 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Form.Area.html @@ -0,0 +1,3008 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\FormArea

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + +
AreaCountryFormClass AreaCountryForm
AreaPostageFormClass AreaPostageForm
AreaModificationFormClass AreaModificationForm
AreaCreateFormClass AreaCreateForm
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Form.Image.html b/documentation/api/namespaces/Thelia.Form.Image.html new file mode 100644 index 000000000..3423aed60 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Form.Image.html @@ -0,0 +1,3000 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\FormImage

+ + + + +

Classes

+ + + + + + + + + +
DocumentModificationCreated by JetBrains PhpStorm.
ImageModificationCreated by JetBrains PhpStorm.
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Form.Lang.html b/documentation/api/namespaces/Thelia.Form.Lang.html new file mode 100644 index 000000000..20ed8c08a --- /dev/null +++ b/documentation/api/namespaces/Thelia.Form.Lang.html @@ -0,0 +1,3012 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\FormLang

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + + + + + +
LangUpdateFormClass LangUpdateForm
LangDefaultBehaviorFormClass LangDefaultBehaviorForm
LangUrlFormClass LangUrlForm
LangUrlEventClass LangUrlEvent
LangCreateFormClass LangCreateForm
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Form.ShippingZone.html b/documentation/api/namespaces/Thelia.Form.ShippingZone.html new file mode 100644 index 000000000..60a72b0a1 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Form.ShippingZone.html @@ -0,0 +1,3000 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\FormShippingZone

+ + + + +

Classes

+ + + + + + + + + +
ShippingZoneRemoveAreaClass ShippingZoneRemoveArea
ShippingZoneAddAreaClass ShippingZoneAddArea
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Install.Exception.html b/documentation/api/namespaces/Thelia.Install.Exception.html new file mode 100644 index 000000000..732f23fbd --- /dev/null +++ b/documentation/api/namespaces/Thelia.Install.Exception.html @@ -0,0 +1,3000 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\InstallException

+ + + + +

Classes

+ + + + + + + + + +
InstallExceptionClass InstallException
AlreadyInstallExceptionClass AlreadyInstallException
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Install.html b/documentation/api/namespaces/Thelia.Install.html new file mode 100644 index 000000000..0d9c3dd89 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Install.html @@ -0,0 +1,3012 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaInstall

+ +

Namespaces

+ + + + +
Exception
+ + + +

Classes

+ + + + + + + + + + + + + + + + + +
CheckDatabaseConnectionClass CheckDatabaseConnection
CheckPermissionClass CheckPermission
BaseInstallClass BaseInstall
DatabaseClass Database
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Mailer.html b/documentation/api/namespaces/Thelia.Mailer.html new file mode 100644 index 000000000..335cbdb64 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Mailer.html @@ -0,0 +1,2994 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaMailer

+ + + + +

Classes

+ + + + + +
MailerFactoryClass MailerFactory
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Model.Exception.html b/documentation/api/namespaces/Thelia.Model.Exception.html new file mode 100644 index 000000000..45f43754f --- /dev/null +++ b/documentation/api/namespaces/Thelia.Model.Exception.html @@ -0,0 +1,3000 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\ModelException

+ + + + +

Classes

+ + + + + + + + + +
ModelException
InvalidArgumentException
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Model.Tools.html b/documentation/api/namespaces/Thelia.Model.Tools.html new file mode 100644 index 000000000..f83de30bf --- /dev/null +++ b/documentation/api/namespaces/Thelia.Model.Tools.html @@ -0,0 +1,3011 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\ModelTools

+ + +

Traits

+ + + + + + + + + + + + + +
UrlRewritingTraitA trait for managing Rewriten URLs from model classes
PositionManagementTrait
ModelEventDispatcherTraitA trait to provide event dispatching mechanism to Model objects
+ + +

Classes

+ + + + + +
ModelCriteriaToolsClass ModelCriteriaTools
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Module.Exception.html b/documentation/api/namespaces/Thelia.Module.Exception.html new file mode 100644 index 000000000..7dc02aba4 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Module.Exception.html @@ -0,0 +1,2996 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\ModuleException

+ + + + +

Classes

+ + + + + +
InvalidXmlDocumentExceptionClass InvalidXmlDocumentException
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Rewriting.html b/documentation/api/namespaces/Thelia.Rewriting.html new file mode 100644 index 000000000..3726af9be --- /dev/null +++ b/documentation/api/namespaces/Thelia.Rewriting.html @@ -0,0 +1,2998 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaRewriting

+ + + + +

Classes

+ + + + + + + + + +
RewritingRetrieverClass RewritingRetriever
RewritingResolverClass RewritingResolver
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.TaxEngine.TaxType.html b/documentation/api/namespaces/Thelia.TaxEngine.TaxType.html new file mode 100644 index 000000000..fa0a892ba --- /dev/null +++ b/documentation/api/namespaces/Thelia.TaxEngine.TaxType.html @@ -0,0 +1,3008 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\TaxEngineTaxType

+ + + + +

Classes

+ + + + + + + + + + + + + + + + + +
BaseTaxType
FixAmountTaxType
FeatureFixAmountTaxType
PricePercentTaxType
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.TaxEngine.html b/documentation/api/namespaces/Thelia.TaxEngine.html new file mode 100644 index 000000000..347cc6233 --- /dev/null +++ b/documentation/api/namespaces/Thelia.TaxEngine.html @@ -0,0 +1,3008 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\TheliaTaxEngine

+ +

Namespaces

+ + + + +
TaxType
+ + + +

Classes

+ + + + + + + + + + + + + +
CalculatorClass Calculator
OrderProductTaxCollection
TaxEngineClass TaxEngine
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/namespaces/Thelia.Tools.Rest.html b/documentation/api/namespaces/Thelia.Tools.Rest.html new file mode 100644 index 000000000..324574f29 --- /dev/null +++ b/documentation/api/namespaces/Thelia.Tools.Rest.html @@ -0,0 +1,2996 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +

\Thelia\ToolsRest

+ + + + +

Classes

+ + + + + +
ResponseRestClass ResponseRest Create a serialized Response
+
+ + +
+ + + +
+
+ + +
+ + + diff --git a/documentation/api/phpdoc-cache-00/phpdoc-cache-file_d488b531871e3567177ff7a3c6472df7.dat b/documentation/api/phpdoc-cache-00/phpdoc-cache-file_d488b531871e3567177ff7a3c6472df7.dat new file mode 100644 index 000000000..8604d72f9 Binary files /dev/null and b/documentation/api/phpdoc-cache-00/phpdoc-cache-file_d488b531871e3567177ff7a3c6472df7.dat differ diff --git a/documentation/api/phpdoc-cache-00/phpdoc-cache-file_e3f44845b7bc901aedfcb762f95e9497.dat b/documentation/api/phpdoc-cache-00/phpdoc-cache-file_e3f44845b7bc901aedfcb762f95e9497.dat new file mode 100644 index 000000000..8b01b4ef6 Binary files /dev/null and b/documentation/api/phpdoc-cache-00/phpdoc-cache-file_e3f44845b7bc901aedfcb762f95e9497.dat differ diff --git a/documentation/api/phpdoc-cache-01/phpdoc-cache-file_8c064cec9f617f4ddd1003ca5b192739.dat b/documentation/api/phpdoc-cache-01/phpdoc-cache-file_8c064cec9f617f4ddd1003ca5b192739.dat new file mode 100644 index 000000000..ba5e14b33 Binary files /dev/null and b/documentation/api/phpdoc-cache-01/phpdoc-cache-file_8c064cec9f617f4ddd1003ca5b192739.dat differ diff --git a/documentation/api/phpdoc-cache-02/phpdoc-cache-file_2f99fbc9614a4e0685e54b6460717409.dat b/documentation/api/phpdoc-cache-02/phpdoc-cache-file_2f99fbc9614a4e0685e54b6460717409.dat new file mode 100644 index 000000000..183d6a682 Binary files /dev/null and b/documentation/api/phpdoc-cache-02/phpdoc-cache-file_2f99fbc9614a4e0685e54b6460717409.dat differ diff --git a/documentation/api/phpdoc-cache-03/phpdoc-cache-file_067e13747b27116b6617752f987b927b.dat b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_067e13747b27116b6617752f987b927b.dat new file mode 100644 index 000000000..dd7aa4265 Binary files /dev/null and b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_067e13747b27116b6617752f987b927b.dat differ diff --git a/documentation/api/phpdoc-cache-03/phpdoc-cache-file_987efb74c4f426b2dea8d597b68e584e.dat b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_987efb74c4f426b2dea8d597b68e584e.dat new file mode 100644 index 000000000..f44350340 Binary files /dev/null and b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_987efb74c4f426b2dea8d597b68e584e.dat differ diff --git a/documentation/api/phpdoc-cache-03/phpdoc-cache-file_d29ca5c755a20e33f282fb9b02e12e89.dat b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_d29ca5c755a20e33f282fb9b02e12e89.dat new file mode 100644 index 000000000..60971c5c1 Binary files /dev/null and b/documentation/api/phpdoc-cache-03/phpdoc-cache-file_d29ca5c755a20e33f282fb9b02e12e89.dat differ diff --git a/documentation/api/phpdoc-cache-05/phpdoc-cache-file_408f1a1532b9dd5c417719c14ef9a41b.dat b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_408f1a1532b9dd5c417719c14ef9a41b.dat new file mode 100644 index 000000000..3a31472e2 Binary files /dev/null and b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_408f1a1532b9dd5c417719c14ef9a41b.dat differ diff --git a/documentation/api/phpdoc-cache-05/phpdoc-cache-file_4b85f843b332ec3e136619f039ac82cf.dat b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_4b85f843b332ec3e136619f039ac82cf.dat new file mode 100644 index 000000000..729e9540c Binary files /dev/null and b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_4b85f843b332ec3e136619f039ac82cf.dat differ diff --git a/documentation/api/phpdoc-cache-05/phpdoc-cache-file_a6535a94d7f84a3d440e689f1d5d8792.dat b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_a6535a94d7f84a3d440e689f1d5d8792.dat new file mode 100644 index 000000000..17ec24223 Binary files /dev/null and b/documentation/api/phpdoc-cache-05/phpdoc-cache-file_a6535a94d7f84a3d440e689f1d5d8792.dat differ diff --git a/documentation/api/phpdoc-cache-06/phpdoc-cache-file_89fb716114840b7f041a8ea9fcee61b5.dat b/documentation/api/phpdoc-cache-06/phpdoc-cache-file_89fb716114840b7f041a8ea9fcee61b5.dat new file mode 100644 index 000000000..e0701d5c8 Binary files /dev/null and b/documentation/api/phpdoc-cache-06/phpdoc-cache-file_89fb716114840b7f041a8ea9fcee61b5.dat differ diff --git a/documentation/api/phpdoc-cache-06/phpdoc-cache-file_d4650072af6e6fdadfef28a39f043d30.dat b/documentation/api/phpdoc-cache-06/phpdoc-cache-file_d4650072af6e6fdadfef28a39f043d30.dat new file mode 100644 index 000000000..d253cc8e4 Binary files /dev/null and b/documentation/api/phpdoc-cache-06/phpdoc-cache-file_d4650072af6e6fdadfef28a39f043d30.dat differ diff --git a/documentation/api/phpdoc-cache-07/phpdoc-cache-file_471226b378c2ec73cdceac40ce579cb2.dat b/documentation/api/phpdoc-cache-07/phpdoc-cache-file_471226b378c2ec73cdceac40ce579cb2.dat new file mode 100644 index 000000000..fb0186dfa Binary files /dev/null and b/documentation/api/phpdoc-cache-07/phpdoc-cache-file_471226b378c2ec73cdceac40ce579cb2.dat differ diff --git a/documentation/api/phpdoc-cache-08/phpdoc-cache-file_01cadbb7266e6faa3b3523b38a8c2050.dat b/documentation/api/phpdoc-cache-08/phpdoc-cache-file_01cadbb7266e6faa3b3523b38a8c2050.dat new file mode 100644 index 000000000..7f0cc789e Binary files /dev/null and b/documentation/api/phpdoc-cache-08/phpdoc-cache-file_01cadbb7266e6faa3b3523b38a8c2050.dat differ diff --git a/documentation/api/phpdoc-cache-08/phpdoc-cache-file_56dddacbf0723f453262d68a3ae9b515.dat b/documentation/api/phpdoc-cache-08/phpdoc-cache-file_56dddacbf0723f453262d68a3ae9b515.dat new file mode 100644 index 000000000..22882b849 Binary files /dev/null and b/documentation/api/phpdoc-cache-08/phpdoc-cache-file_56dddacbf0723f453262d68a3ae9b515.dat differ diff --git a/documentation/api/phpdoc-cache-09/phpdoc-cache-file_3972f1bd18e1ee15e8dc081a2486abcc.dat b/documentation/api/phpdoc-cache-09/phpdoc-cache-file_3972f1bd18e1ee15e8dc081a2486abcc.dat new file mode 100644 index 000000000..04a1bc255 Binary files /dev/null and b/documentation/api/phpdoc-cache-09/phpdoc-cache-file_3972f1bd18e1ee15e8dc081a2486abcc.dat differ diff --git a/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_145365ef476bafdca7f6fb9a99524671.dat b/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_145365ef476bafdca7f6fb9a99524671.dat new file mode 100644 index 000000000..53b34b708 Binary files /dev/null and b/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_145365ef476bafdca7f6fb9a99524671.dat differ diff --git a/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_ce50ddf380fdb270814c53b2e8a90d88.dat b/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_ce50ddf380fdb270814c53b2e8a90d88.dat new file mode 100644 index 000000000..17a6eb1a6 Binary files /dev/null and b/documentation/api/phpdoc-cache-0b/phpdoc-cache-file_ce50ddf380fdb270814c53b2e8a90d88.dat differ diff --git a/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_55853b95227136688b0505cc43a0623c.dat b/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_55853b95227136688b0505cc43a0623c.dat new file mode 100644 index 000000000..792f3e4c4 Binary files /dev/null and b/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_55853b95227136688b0505cc43a0623c.dat differ diff --git a/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_afd2575ec658e4e4e3f224058592f481.dat b/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_afd2575ec658e4e4e3f224058592f481.dat new file mode 100644 index 000000000..c852df01d Binary files /dev/null and b/documentation/api/phpdoc-cache-0c/phpdoc-cache-file_afd2575ec658e4e4e3f224058592f481.dat differ diff --git a/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_e6531933467e9a594119ee142a518891.dat b/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_e6531933467e9a594119ee142a518891.dat new file mode 100644 index 000000000..758295ed6 Binary files /dev/null and b/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_e6531933467e9a594119ee142a518891.dat differ diff --git a/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_fe443d41c54d13cfc10b02ad23c80ca3.dat b/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_fe443d41c54d13cfc10b02ad23c80ca3.dat new file mode 100644 index 000000000..9dd4a36b7 Binary files /dev/null and b/documentation/api/phpdoc-cache-0d/phpdoc-cache-file_fe443d41c54d13cfc10b02ad23c80ca3.dat differ diff --git a/documentation/api/phpdoc-cache-0e/phpdoc-cache-file_48a0249a36cdb7f29655f0e6116a6a85.dat b/documentation/api/phpdoc-cache-0e/phpdoc-cache-file_48a0249a36cdb7f29655f0e6116a6a85.dat new file mode 100644 index 000000000..7e8c9ffd4 Binary files /dev/null and b/documentation/api/phpdoc-cache-0e/phpdoc-cache-file_48a0249a36cdb7f29655f0e6116a6a85.dat differ diff --git a/documentation/api/phpdoc-cache-0f/phpdoc-cache-file_737b7a892a311bbad7fdd2e651d73b2e.dat b/documentation/api/phpdoc-cache-0f/phpdoc-cache-file_737b7a892a311bbad7fdd2e651d73b2e.dat new file mode 100644 index 000000000..7560329fa Binary files /dev/null and b/documentation/api/phpdoc-cache-0f/phpdoc-cache-file_737b7a892a311bbad7fdd2e651d73b2e.dat differ diff --git a/documentation/api/phpdoc-cache-10/phpdoc-cache-file_34dc571f795482778e701aa32e9095fe.dat b/documentation/api/phpdoc-cache-10/phpdoc-cache-file_34dc571f795482778e701aa32e9095fe.dat new file mode 100644 index 000000000..881de2fea Binary files /dev/null and b/documentation/api/phpdoc-cache-10/phpdoc-cache-file_34dc571f795482778e701aa32e9095fe.dat differ diff --git a/documentation/api/phpdoc-cache-10/phpdoc-cache-file_42ace0dee54fe5e7188c58a98eb3338e.dat b/documentation/api/phpdoc-cache-10/phpdoc-cache-file_42ace0dee54fe5e7188c58a98eb3338e.dat new file mode 100644 index 000000000..90c089ce1 Binary files /dev/null and b/documentation/api/phpdoc-cache-10/phpdoc-cache-file_42ace0dee54fe5e7188c58a98eb3338e.dat differ diff --git a/documentation/api/phpdoc-cache-11/phpdoc-cache-file_ce2630257cdfc1f73ddabce8fee41436.dat b/documentation/api/phpdoc-cache-11/phpdoc-cache-file_ce2630257cdfc1f73ddabce8fee41436.dat new file mode 100644 index 000000000..3a02120af Binary files /dev/null and b/documentation/api/phpdoc-cache-11/phpdoc-cache-file_ce2630257cdfc1f73ddabce8fee41436.dat differ diff --git a/documentation/api/phpdoc-cache-13/phpdoc-cache-file_0ce3cc93eb197d4df1700c05428f4431.dat b/documentation/api/phpdoc-cache-13/phpdoc-cache-file_0ce3cc93eb197d4df1700c05428f4431.dat new file mode 100644 index 000000000..f6cdcda7d Binary files /dev/null and b/documentation/api/phpdoc-cache-13/phpdoc-cache-file_0ce3cc93eb197d4df1700c05428f4431.dat differ diff --git a/documentation/api/phpdoc-cache-13/phpdoc-cache-file_61384291ad0ff899accafe3bd1d8a3e8.dat b/documentation/api/phpdoc-cache-13/phpdoc-cache-file_61384291ad0ff899accafe3bd1d8a3e8.dat new file mode 100644 index 000000000..226643245 Binary files /dev/null and b/documentation/api/phpdoc-cache-13/phpdoc-cache-file_61384291ad0ff899accafe3bd1d8a3e8.dat differ diff --git a/documentation/api/phpdoc-cache-14/phpdoc-cache-file_74acc6018f37df3ba3856d6c4d2877df.dat b/documentation/api/phpdoc-cache-14/phpdoc-cache-file_74acc6018f37df3ba3856d6c4d2877df.dat new file mode 100644 index 000000000..c60482d04 Binary files /dev/null and b/documentation/api/phpdoc-cache-14/phpdoc-cache-file_74acc6018f37df3ba3856d6c4d2877df.dat differ diff --git a/documentation/api/phpdoc-cache-14/phpdoc-cache-file_e24cf2c9c79516865176ae3f0647d006.dat b/documentation/api/phpdoc-cache-14/phpdoc-cache-file_e24cf2c9c79516865176ae3f0647d006.dat new file mode 100644 index 000000000..ffec8a3d0 Binary files /dev/null and b/documentation/api/phpdoc-cache-14/phpdoc-cache-file_e24cf2c9c79516865176ae3f0647d006.dat differ diff --git a/documentation/api/phpdoc-cache-15/phpdoc-cache-file_156853ecbd45420999b61b4b053ed166.dat b/documentation/api/phpdoc-cache-15/phpdoc-cache-file_156853ecbd45420999b61b4b053ed166.dat new file mode 100644 index 000000000..04e2a9abc Binary files /dev/null and b/documentation/api/phpdoc-cache-15/phpdoc-cache-file_156853ecbd45420999b61b4b053ed166.dat differ diff --git a/documentation/api/phpdoc-cache-15/phpdoc-cache-file_4234118cfa62b676f9b41170e6d77f79.dat b/documentation/api/phpdoc-cache-15/phpdoc-cache-file_4234118cfa62b676f9b41170e6d77f79.dat new file mode 100644 index 000000000..8279e41ee Binary files /dev/null and b/documentation/api/phpdoc-cache-15/phpdoc-cache-file_4234118cfa62b676f9b41170e6d77f79.dat differ diff --git a/documentation/api/phpdoc-cache-16/phpdoc-cache-file_54bd3ef2e620bfc8a668962720a055b2.dat b/documentation/api/phpdoc-cache-16/phpdoc-cache-file_54bd3ef2e620bfc8a668962720a055b2.dat new file mode 100644 index 000000000..019c725d9 Binary files /dev/null and b/documentation/api/phpdoc-cache-16/phpdoc-cache-file_54bd3ef2e620bfc8a668962720a055b2.dat differ diff --git a/documentation/api/phpdoc-cache-17/phpdoc-cache-file_f1e1bc12d049937adad9c34b5d1291fe.dat b/documentation/api/phpdoc-cache-17/phpdoc-cache-file_f1e1bc12d049937adad9c34b5d1291fe.dat new file mode 100644 index 000000000..94c0d6cce Binary files /dev/null and b/documentation/api/phpdoc-cache-17/phpdoc-cache-file_f1e1bc12d049937adad9c34b5d1291fe.dat differ diff --git a/documentation/api/phpdoc-cache-18/phpdoc-cache-file_2477984dc9aac61689ec5e766bf0454d.dat b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_2477984dc9aac61689ec5e766bf0454d.dat new file mode 100644 index 000000000..d9d5dc69b Binary files /dev/null and b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_2477984dc9aac61689ec5e766bf0454d.dat differ diff --git a/documentation/api/phpdoc-cache-18/phpdoc-cache-file_3329edea9b7935fea45bce9ab7d7aae1.dat b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_3329edea9b7935fea45bce9ab7d7aae1.dat new file mode 100644 index 000000000..704111da5 Binary files /dev/null and b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_3329edea9b7935fea45bce9ab7d7aae1.dat differ diff --git a/documentation/api/phpdoc-cache-18/phpdoc-cache-file_8791311ca8d6cce776b9bc6595920b0c.dat b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_8791311ca8d6cce776b9bc6595920b0c.dat new file mode 100644 index 000000000..7be729895 Binary files /dev/null and b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_8791311ca8d6cce776b9bc6595920b0c.dat differ diff --git a/documentation/api/phpdoc-cache-18/phpdoc-cache-file_a516ab51bdb6edccb8f6acd6543ab525.dat b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_a516ab51bdb6edccb8f6acd6543ab525.dat new file mode 100644 index 000000000..04a52438c Binary files /dev/null and b/documentation/api/phpdoc-cache-18/phpdoc-cache-file_a516ab51bdb6edccb8f6acd6543ab525.dat differ diff --git a/documentation/api/phpdoc-cache-19/phpdoc-cache-file_a62261cb7ec7c81154fde1832dd06626.dat b/documentation/api/phpdoc-cache-19/phpdoc-cache-file_a62261cb7ec7c81154fde1832dd06626.dat new file mode 100644 index 000000000..5ccc24284 Binary files /dev/null and b/documentation/api/phpdoc-cache-19/phpdoc-cache-file_a62261cb7ec7c81154fde1832dd06626.dat differ diff --git a/documentation/api/phpdoc-cache-1b/phpdoc-cache-file_38cf757e843eabc630b73bc5079912d9.dat b/documentation/api/phpdoc-cache-1b/phpdoc-cache-file_38cf757e843eabc630b73bc5079912d9.dat new file mode 100644 index 000000000..850c67177 Binary files /dev/null and b/documentation/api/phpdoc-cache-1b/phpdoc-cache-file_38cf757e843eabc630b73bc5079912d9.dat differ diff --git a/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_541f119ff1fb0f42933e75070a6f98f1.dat b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_541f119ff1fb0f42933e75070a6f98f1.dat new file mode 100644 index 000000000..e7eb4a84d Binary files /dev/null and b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_541f119ff1fb0f42933e75070a6f98f1.dat differ diff --git a/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_6f4afedc080108fae3a67e794bad827d.dat b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_6f4afedc080108fae3a67e794bad827d.dat new file mode 100644 index 000000000..846b95b6c Binary files /dev/null and b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_6f4afedc080108fae3a67e794bad827d.dat differ diff --git a/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_91b91407eaabcc3c500a3513668a0445.dat b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_91b91407eaabcc3c500a3513668a0445.dat new file mode 100644 index 000000000..b08010640 Binary files /dev/null and b/documentation/api/phpdoc-cache-1c/phpdoc-cache-file_91b91407eaabcc3c500a3513668a0445.dat differ diff --git a/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_4e7fc06ad0b94280ce725a5fe757a209.dat b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_4e7fc06ad0b94280ce725a5fe757a209.dat new file mode 100644 index 000000000..490263176 Binary files /dev/null and b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_4e7fc06ad0b94280ce725a5fe757a209.dat differ diff --git a/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_5fd7475b4665c51d9c8d692c5e52cff6.dat b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_5fd7475b4665c51d9c8d692c5e52cff6.dat new file mode 100644 index 000000000..a2adb1789 Binary files /dev/null and b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_5fd7475b4665c51d9c8d692c5e52cff6.dat differ diff --git a/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_ce259c6f2821320a655dcb7bc586f17d.dat b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_ce259c6f2821320a655dcb7bc586f17d.dat new file mode 100644 index 000000000..1cd8f885c Binary files /dev/null and b/documentation/api/phpdoc-cache-1d/phpdoc-cache-file_ce259c6f2821320a655dcb7bc586f17d.dat differ diff --git a/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_0fb71a4747805c74ace0b13ff7dcda58.dat b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_0fb71a4747805c74ace0b13ff7dcda58.dat new file mode 100644 index 000000000..d38be2480 Binary files /dev/null and b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_0fb71a4747805c74ace0b13ff7dcda58.dat differ diff --git a/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_5e485c774d41a4d2b75d77f15e421ccd.dat b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_5e485c774d41a4d2b75d77f15e421ccd.dat new file mode 100644 index 000000000..263b834f8 Binary files /dev/null and b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_5e485c774d41a4d2b75d77f15e421ccd.dat differ diff --git a/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_9b7e7ffd565599c1063cf9ce48cb82e2.dat b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_9b7e7ffd565599c1063cf9ce48cb82e2.dat new file mode 100644 index 000000000..f65df91f1 Binary files /dev/null and b/documentation/api/phpdoc-cache-1e/phpdoc-cache-file_9b7e7ffd565599c1063cf9ce48cb82e2.dat differ diff --git a/documentation/api/phpdoc-cache-20/phpdoc-cache-file_af3b19bcd66e4302a258afc449e1163f.dat b/documentation/api/phpdoc-cache-20/phpdoc-cache-file_af3b19bcd66e4302a258afc449e1163f.dat new file mode 100644 index 000000000..f04040a2d Binary files /dev/null and b/documentation/api/phpdoc-cache-20/phpdoc-cache-file_af3b19bcd66e4302a258afc449e1163f.dat differ diff --git a/documentation/api/phpdoc-cache-21/phpdoc-cache-file_dee7f2ac9b155b8df2bdfaa580060fa2.dat b/documentation/api/phpdoc-cache-21/phpdoc-cache-file_dee7f2ac9b155b8df2bdfaa580060fa2.dat new file mode 100644 index 000000000..71806bb6b Binary files /dev/null and b/documentation/api/phpdoc-cache-21/phpdoc-cache-file_dee7f2ac9b155b8df2bdfaa580060fa2.dat differ diff --git a/documentation/api/phpdoc-cache-22/phpdoc-cache-file_0571982e8932d650e56a7dab34a3c318.dat b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_0571982e8932d650e56a7dab34a3c318.dat new file mode 100644 index 000000000..5a3a1e1b3 Binary files /dev/null and b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_0571982e8932d650e56a7dab34a3c318.dat differ diff --git a/documentation/api/phpdoc-cache-22/phpdoc-cache-file_5b8832e496ec278cc7b982ea5bdf37cb.dat b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_5b8832e496ec278cc7b982ea5bdf37cb.dat new file mode 100644 index 000000000..6d7b4425f Binary files /dev/null and b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_5b8832e496ec278cc7b982ea5bdf37cb.dat differ diff --git a/documentation/api/phpdoc-cache-22/phpdoc-cache-file_c47ee59eda9bcea9531c418ae1abd3aa.dat b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_c47ee59eda9bcea9531c418ae1abd3aa.dat new file mode 100644 index 000000000..a1d182999 Binary files /dev/null and b/documentation/api/phpdoc-cache-22/phpdoc-cache-file_c47ee59eda9bcea9531c418ae1abd3aa.dat differ diff --git a/documentation/api/phpdoc-cache-23/phpdoc-cache-file_384034cd067817f8486dbe6e571aa1ee.dat b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_384034cd067817f8486dbe6e571aa1ee.dat new file mode 100644 index 000000000..fe576ece5 Binary files /dev/null and b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_384034cd067817f8486dbe6e571aa1ee.dat differ diff --git a/documentation/api/phpdoc-cache-23/phpdoc-cache-file_7fd67c9f5d59dc5af2f7e44e1500cd7d.dat b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_7fd67c9f5d59dc5af2f7e44e1500cd7d.dat new file mode 100644 index 000000000..af9023ca2 Binary files /dev/null and b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_7fd67c9f5d59dc5af2f7e44e1500cd7d.dat differ diff --git a/documentation/api/phpdoc-cache-23/phpdoc-cache-file_b5d6a1c006949735598eaced2f3dd65c.dat b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_b5d6a1c006949735598eaced2f3dd65c.dat new file mode 100644 index 000000000..e2574448c Binary files /dev/null and b/documentation/api/phpdoc-cache-23/phpdoc-cache-file_b5d6a1c006949735598eaced2f3dd65c.dat differ diff --git a/documentation/api/phpdoc-cache-24/phpdoc-cache-file_6b07613990bd7a5c860ec99bdbbe83d0.dat b/documentation/api/phpdoc-cache-24/phpdoc-cache-file_6b07613990bd7a5c860ec99bdbbe83d0.dat new file mode 100644 index 000000000..cd3493231 Binary files /dev/null and b/documentation/api/phpdoc-cache-24/phpdoc-cache-file_6b07613990bd7a5c860ec99bdbbe83d0.dat differ diff --git a/documentation/api/phpdoc-cache-24/phpdoc-cache-file_9e0e7d54583b7b7145617819f799284e.dat b/documentation/api/phpdoc-cache-24/phpdoc-cache-file_9e0e7d54583b7b7145617819f799284e.dat new file mode 100644 index 000000000..de8020a72 Binary files /dev/null and b/documentation/api/phpdoc-cache-24/phpdoc-cache-file_9e0e7d54583b7b7145617819f799284e.dat differ diff --git a/documentation/api/phpdoc-cache-25/phpdoc-cache-file_27f592d05576d490c72d471ca3857ee5.dat b/documentation/api/phpdoc-cache-25/phpdoc-cache-file_27f592d05576d490c72d471ca3857ee5.dat new file mode 100644 index 000000000..a1248703f Binary files /dev/null and b/documentation/api/phpdoc-cache-25/phpdoc-cache-file_27f592d05576d490c72d471ca3857ee5.dat differ diff --git a/documentation/api/phpdoc-cache-25/phpdoc-cache-file_80645ddfa6e1527c9767cf6ccae2a055.dat b/documentation/api/phpdoc-cache-25/phpdoc-cache-file_80645ddfa6e1527c9767cf6ccae2a055.dat new file mode 100644 index 000000000..e3aef864c Binary files /dev/null and b/documentation/api/phpdoc-cache-25/phpdoc-cache-file_80645ddfa6e1527c9767cf6ccae2a055.dat differ diff --git a/documentation/api/phpdoc-cache-26/phpdoc-cache-file_9d894815e27118c094dc8ef1fdb3bb48.dat b/documentation/api/phpdoc-cache-26/phpdoc-cache-file_9d894815e27118c094dc8ef1fdb3bb48.dat new file mode 100644 index 000000000..40d706527 Binary files /dev/null and b/documentation/api/phpdoc-cache-26/phpdoc-cache-file_9d894815e27118c094dc8ef1fdb3bb48.dat differ diff --git a/documentation/api/phpdoc-cache-27/phpdoc-cache-file_0b75a306635170ad565456a2523f58f7.dat b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_0b75a306635170ad565456a2523f58f7.dat new file mode 100644 index 000000000..b41006fa6 Binary files /dev/null and b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_0b75a306635170ad565456a2523f58f7.dat differ diff --git a/documentation/api/phpdoc-cache-27/phpdoc-cache-file_2aa255908ba65bfa61fb272f6fe0959e.dat b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_2aa255908ba65bfa61fb272f6fe0959e.dat new file mode 100644 index 000000000..2698d7fc9 Binary files /dev/null and b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_2aa255908ba65bfa61fb272f6fe0959e.dat differ diff --git a/documentation/api/phpdoc-cache-27/phpdoc-cache-file_851ff8396ff9f7aee9390aa67fb1b830.dat b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_851ff8396ff9f7aee9390aa67fb1b830.dat new file mode 100644 index 000000000..9c9699ea1 Binary files /dev/null and b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_851ff8396ff9f7aee9390aa67fb1b830.dat differ diff --git a/documentation/api/phpdoc-cache-27/phpdoc-cache-file_94411f1d136300ce11420e733446a15a.dat b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_94411f1d136300ce11420e733446a15a.dat new file mode 100644 index 000000000..811dd3399 Binary files /dev/null and b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_94411f1d136300ce11420e733446a15a.dat differ diff --git a/documentation/api/phpdoc-cache-27/phpdoc-cache-file_f6702b41d82be58f5eef166de3caf908.dat b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_f6702b41d82be58f5eef166de3caf908.dat new file mode 100644 index 000000000..dda4dd1f5 Binary files /dev/null and b/documentation/api/phpdoc-cache-27/phpdoc-cache-file_f6702b41d82be58f5eef166de3caf908.dat differ diff --git a/documentation/api/phpdoc-cache-28/phpdoc-cache-file_c79afe442aef4bf4c5abedd44c7c8727.dat b/documentation/api/phpdoc-cache-28/phpdoc-cache-file_c79afe442aef4bf4c5abedd44c7c8727.dat new file mode 100644 index 000000000..73042b1cc Binary files /dev/null and b/documentation/api/phpdoc-cache-28/phpdoc-cache-file_c79afe442aef4bf4c5abedd44c7c8727.dat differ diff --git a/documentation/api/phpdoc-cache-29/phpdoc-cache-file_c8d313ad1f23d0335e5ecaaa631f7d0a.dat b/documentation/api/phpdoc-cache-29/phpdoc-cache-file_c8d313ad1f23d0335e5ecaaa631f7d0a.dat new file mode 100644 index 000000000..d8e1738de Binary files /dev/null and b/documentation/api/phpdoc-cache-29/phpdoc-cache-file_c8d313ad1f23d0335e5ecaaa631f7d0a.dat differ diff --git a/documentation/api/phpdoc-cache-2a/phpdoc-cache-file_d4a7334ce6607974fdfe61fad7fd3937.dat b/documentation/api/phpdoc-cache-2a/phpdoc-cache-file_d4a7334ce6607974fdfe61fad7fd3937.dat new file mode 100644 index 000000000..a57f4c1d5 Binary files /dev/null and b/documentation/api/phpdoc-cache-2a/phpdoc-cache-file_d4a7334ce6607974fdfe61fad7fd3937.dat differ diff --git a/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_3f2639a5470f2f0d5046868250adaf17.dat b/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_3f2639a5470f2f0d5046868250adaf17.dat new file mode 100644 index 000000000..a27a20fb8 Binary files /dev/null and b/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_3f2639a5470f2f0d5046868250adaf17.dat differ diff --git a/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_6d3384084eb1f09bea20e589ba1f274f.dat b/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_6d3384084eb1f09bea20e589ba1f274f.dat new file mode 100644 index 000000000..6416e6ea0 Binary files /dev/null and b/documentation/api/phpdoc-cache-2c/phpdoc-cache-file_6d3384084eb1f09bea20e589ba1f274f.dat differ diff --git a/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_9fa583985b39688baf3ed363455548ce.dat b/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_9fa583985b39688baf3ed363455548ce.dat new file mode 100644 index 000000000..330fdb5a4 Binary files /dev/null and b/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_9fa583985b39688baf3ed363455548ce.dat differ diff --git a/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_f19a43b2e8b65fea3daaa587946a6b3b.dat b/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_f19a43b2e8b65fea3daaa587946a6b3b.dat new file mode 100644 index 000000000..8bd6bb6cf Binary files /dev/null and b/documentation/api/phpdoc-cache-2d/phpdoc-cache-file_f19a43b2e8b65fea3daaa587946a6b3b.dat differ diff --git a/documentation/api/phpdoc-cache-2e/phpdoc-cache-file_c697a770709c553ae7fa53a0a0eb20a2.dat b/documentation/api/phpdoc-cache-2e/phpdoc-cache-file_c697a770709c553ae7fa53a0a0eb20a2.dat new file mode 100644 index 000000000..488957ccd Binary files /dev/null and b/documentation/api/phpdoc-cache-2e/phpdoc-cache-file_c697a770709c553ae7fa53a0a0eb20a2.dat differ diff --git a/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_5dd0173ab50d363d9cf2c440b017ff5d.dat b/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_5dd0173ab50d363d9cf2c440b017ff5d.dat new file mode 100644 index 000000000..2180f4647 Binary files /dev/null and b/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_5dd0173ab50d363d9cf2c440b017ff5d.dat differ diff --git a/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_f610f31a91d21e33684dddd161a997ad.dat b/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_f610f31a91d21e33684dddd161a997ad.dat new file mode 100644 index 000000000..b493aadbe Binary files /dev/null and b/documentation/api/phpdoc-cache-2f/phpdoc-cache-file_f610f31a91d21e33684dddd161a997ad.dat differ diff --git a/documentation/api/phpdoc-cache-30/phpdoc-cache-file_98851e8213edefe5b6f0f2becf0e56b7.dat b/documentation/api/phpdoc-cache-30/phpdoc-cache-file_98851e8213edefe5b6f0f2becf0e56b7.dat new file mode 100644 index 000000000..5fb955de8 Binary files /dev/null and b/documentation/api/phpdoc-cache-30/phpdoc-cache-file_98851e8213edefe5b6f0f2becf0e56b7.dat differ diff --git a/documentation/api/phpdoc-cache-30/phpdoc-cache-file_f816ec0372c283da66ac39f946d8681c.dat b/documentation/api/phpdoc-cache-30/phpdoc-cache-file_f816ec0372c283da66ac39f946d8681c.dat new file mode 100644 index 000000000..e479fb58c Binary files /dev/null and b/documentation/api/phpdoc-cache-30/phpdoc-cache-file_f816ec0372c283da66ac39f946d8681c.dat differ diff --git a/documentation/api/phpdoc-cache-31/phpdoc-cache-file_1ed25fbd4a7d5001a17c5a2aa2e979b6.dat b/documentation/api/phpdoc-cache-31/phpdoc-cache-file_1ed25fbd4a7d5001a17c5a2aa2e979b6.dat new file mode 100644 index 000000000..4a3c41b0f Binary files /dev/null and b/documentation/api/phpdoc-cache-31/phpdoc-cache-file_1ed25fbd4a7d5001a17c5a2aa2e979b6.dat differ diff --git a/documentation/api/phpdoc-cache-31/phpdoc-cache-file_c946f45e3918b45c654e1dc482322070.dat b/documentation/api/phpdoc-cache-31/phpdoc-cache-file_c946f45e3918b45c654e1dc482322070.dat new file mode 100644 index 000000000..cc19183c0 Binary files /dev/null and b/documentation/api/phpdoc-cache-31/phpdoc-cache-file_c946f45e3918b45c654e1dc482322070.dat differ diff --git a/documentation/api/phpdoc-cache-32/phpdoc-cache-file_54ec466d1c61ff14a9c4a9b5da32923c.dat b/documentation/api/phpdoc-cache-32/phpdoc-cache-file_54ec466d1c61ff14a9c4a9b5da32923c.dat new file mode 100644 index 000000000..d71e04190 Binary files /dev/null and b/documentation/api/phpdoc-cache-32/phpdoc-cache-file_54ec466d1c61ff14a9c4a9b5da32923c.dat differ diff --git a/documentation/api/phpdoc-cache-32/phpdoc-cache-file_fb92a84f8f2307fb282f1364c0fcf6e9.dat b/documentation/api/phpdoc-cache-32/phpdoc-cache-file_fb92a84f8f2307fb282f1364c0fcf6e9.dat new file mode 100644 index 000000000..644d6e743 Binary files /dev/null and b/documentation/api/phpdoc-cache-32/phpdoc-cache-file_fb92a84f8f2307fb282f1364c0fcf6e9.dat differ diff --git a/documentation/api/phpdoc-cache-33/phpdoc-cache-file_1bad22c5bbd477a2cdf2be957aaf051e.dat b/documentation/api/phpdoc-cache-33/phpdoc-cache-file_1bad22c5bbd477a2cdf2be957aaf051e.dat new file mode 100644 index 000000000..6e06ef740 Binary files /dev/null and b/documentation/api/phpdoc-cache-33/phpdoc-cache-file_1bad22c5bbd477a2cdf2be957aaf051e.dat differ diff --git a/documentation/api/phpdoc-cache-33/phpdoc-cache-file_38305c5b22a8490d083ffdc7d550ea8d.dat b/documentation/api/phpdoc-cache-33/phpdoc-cache-file_38305c5b22a8490d083ffdc7d550ea8d.dat new file mode 100644 index 000000000..97274dc06 Binary files /dev/null and b/documentation/api/phpdoc-cache-33/phpdoc-cache-file_38305c5b22a8490d083ffdc7d550ea8d.dat differ diff --git a/documentation/api/phpdoc-cache-34/phpdoc-cache-file_b1190a36474c9cb60464f214bb9e093f.dat b/documentation/api/phpdoc-cache-34/phpdoc-cache-file_b1190a36474c9cb60464f214bb9e093f.dat new file mode 100644 index 000000000..8da839539 Binary files /dev/null and b/documentation/api/phpdoc-cache-34/phpdoc-cache-file_b1190a36474c9cb60464f214bb9e093f.dat differ diff --git a/documentation/api/phpdoc-cache-35/phpdoc-cache-file_cd329263b3f5b34cc6cdaeeec37fe33b.dat b/documentation/api/phpdoc-cache-35/phpdoc-cache-file_cd329263b3f5b34cc6cdaeeec37fe33b.dat new file mode 100644 index 000000000..c0cf1a92c Binary files /dev/null and b/documentation/api/phpdoc-cache-35/phpdoc-cache-file_cd329263b3f5b34cc6cdaeeec37fe33b.dat differ diff --git a/documentation/api/phpdoc-cache-37/phpdoc-cache-file_18c5f7eed4284d2f03d3a3e9a6e983c6.dat b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_18c5f7eed4284d2f03d3a3e9a6e983c6.dat new file mode 100644 index 000000000..bc5d222c5 Binary files /dev/null and b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_18c5f7eed4284d2f03d3a3e9a6e983c6.dat differ diff --git a/documentation/api/phpdoc-cache-37/phpdoc-cache-file_2855b431164cfb3764e2a1616f8ae1b2.dat b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_2855b431164cfb3764e2a1616f8ae1b2.dat new file mode 100644 index 000000000..984388165 Binary files /dev/null and b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_2855b431164cfb3764e2a1616f8ae1b2.dat differ diff --git a/documentation/api/phpdoc-cache-37/phpdoc-cache-file_4489f75dc9ee3ffd64f4852ce8fab155.dat b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_4489f75dc9ee3ffd64f4852ce8fab155.dat new file mode 100644 index 000000000..eb8007e7e Binary files /dev/null and b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_4489f75dc9ee3ffd64f4852ce8fab155.dat differ diff --git a/documentation/api/phpdoc-cache-37/phpdoc-cache-file_7480a972116e4b9139704483bd48fb2d.dat b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_7480a972116e4b9139704483bd48fb2d.dat new file mode 100644 index 000000000..16439a868 Binary files /dev/null and b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_7480a972116e4b9139704483bd48fb2d.dat differ diff --git a/documentation/api/phpdoc-cache-37/phpdoc-cache-file_ec9bf983b8fd7dc2de81b6978ec9b8a2.dat b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_ec9bf983b8fd7dc2de81b6978ec9b8a2.dat new file mode 100644 index 000000000..d3ff1c620 Binary files /dev/null and b/documentation/api/phpdoc-cache-37/phpdoc-cache-file_ec9bf983b8fd7dc2de81b6978ec9b8a2.dat differ diff --git a/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_36b4636a64d80be15c78459c50cd0fa3.dat b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_36b4636a64d80be15c78459c50cd0fa3.dat new file mode 100644 index 000000000..5f0b6d896 Binary files /dev/null and b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_36b4636a64d80be15c78459c50cd0fa3.dat differ diff --git a/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_7996a61ef3b20945b5ee9e99a393008d.dat b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_7996a61ef3b20945b5ee9e99a393008d.dat new file mode 100644 index 000000000..78ff4a295 Binary files /dev/null and b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_7996a61ef3b20945b5ee9e99a393008d.dat differ diff --git a/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_838de3393275ef81f58d70402d9fb687.dat b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_838de3393275ef81f58d70402d9fb687.dat new file mode 100644 index 000000000..bb64dc53c Binary files /dev/null and b/documentation/api/phpdoc-cache-3a/phpdoc-cache-file_838de3393275ef81f58d70402d9fb687.dat differ diff --git a/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_22d2509e98509241ae4697854d3f4ddc.dat b/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_22d2509e98509241ae4697854d3f4ddc.dat new file mode 100644 index 000000000..9904ee1d3 Binary files /dev/null and b/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_22d2509e98509241ae4697854d3f4ddc.dat differ diff --git a/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_2929dfe8d384fd3693ad7fd6138356f2.dat b/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_2929dfe8d384fd3693ad7fd6138356f2.dat new file mode 100644 index 000000000..83b27df93 Binary files /dev/null and b/documentation/api/phpdoc-cache-3b/phpdoc-cache-file_2929dfe8d384fd3693ad7fd6138356f2.dat differ diff --git a/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_298ee5879fb242d96c9e82da5cea75ff.dat b/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_298ee5879fb242d96c9e82da5cea75ff.dat new file mode 100644 index 000000000..ba615c829 Binary files /dev/null and b/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_298ee5879fb242d96c9e82da5cea75ff.dat differ diff --git a/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_d31cc1b3ea1851297a1806b3797a7b04.dat b/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_d31cc1b3ea1851297a1806b3797a7b04.dat new file mode 100644 index 000000000..352b41a11 Binary files /dev/null and b/documentation/api/phpdoc-cache-3c/phpdoc-cache-file_d31cc1b3ea1851297a1806b3797a7b04.dat differ diff --git a/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_59c25bb08a5a55fad89e61f445fdcf82.dat b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_59c25bb08a5a55fad89e61f445fdcf82.dat new file mode 100644 index 000000000..66ed01b78 Binary files /dev/null and b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_59c25bb08a5a55fad89e61f445fdcf82.dat differ diff --git a/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_6daec67ebc0e046c0fb93b7aadee17c9.dat b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_6daec67ebc0e046c0fb93b7aadee17c9.dat new file mode 100644 index 000000000..ae22b4a5a Binary files /dev/null and b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_6daec67ebc0e046c0fb93b7aadee17c9.dat differ diff --git a/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_b6fa55807b2ef7e6f873dcfff8d40acf.dat b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_b6fa55807b2ef7e6f873dcfff8d40acf.dat new file mode 100644 index 000000000..9a349d550 Binary files /dev/null and b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_b6fa55807b2ef7e6f873dcfff8d40acf.dat differ diff --git a/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_ba46bb626d48e59503124607f1ecf528.dat b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_ba46bb626d48e59503124607f1ecf528.dat new file mode 100644 index 000000000..3b35c6a72 Binary files /dev/null and b/documentation/api/phpdoc-cache-3d/phpdoc-cache-file_ba46bb626d48e59503124607f1ecf528.dat differ diff --git a/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_72884ac558ad527046e1436048a310aa.dat b/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_72884ac558ad527046e1436048a310aa.dat new file mode 100644 index 000000000..81531f851 Binary files /dev/null and b/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_72884ac558ad527046e1436048a310aa.dat differ diff --git a/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_760b4295a74d552a55449c37b8b131bc.dat b/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_760b4295a74d552a55449c37b8b131bc.dat new file mode 100644 index 000000000..ca93138c2 Binary files /dev/null and b/documentation/api/phpdoc-cache-3e/phpdoc-cache-file_760b4295a74d552a55449c37b8b131bc.dat differ diff --git a/documentation/api/phpdoc-cache-3f/phpdoc-cache-file_44b94f30fe0a59c11d37ad004f1c1738.dat b/documentation/api/phpdoc-cache-3f/phpdoc-cache-file_44b94f30fe0a59c11d37ad004f1c1738.dat new file mode 100644 index 000000000..90ad674e0 Binary files /dev/null and b/documentation/api/phpdoc-cache-3f/phpdoc-cache-file_44b94f30fe0a59c11d37ad004f1c1738.dat differ diff --git a/documentation/api/phpdoc-cache-40/phpdoc-cache-file_4068ae13f7a1dc59b84920e6a9e9d9f6.dat b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_4068ae13f7a1dc59b84920e6a9e9d9f6.dat new file mode 100644 index 000000000..6ef6e1ba3 Binary files /dev/null and b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_4068ae13f7a1dc59b84920e6a9e9d9f6.dat differ diff --git a/documentation/api/phpdoc-cache-40/phpdoc-cache-file_747b18a07c1987b31f7854b32c6dc838.dat b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_747b18a07c1987b31f7854b32c6dc838.dat new file mode 100644 index 000000000..0c5b01611 Binary files /dev/null and b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_747b18a07c1987b31f7854b32c6dc838.dat differ diff --git a/documentation/api/phpdoc-cache-40/phpdoc-cache-file_77edff5be681fcfa99c78d60972a41d4.dat b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_77edff5be681fcfa99c78d60972a41d4.dat new file mode 100644 index 000000000..79f51cb76 Binary files /dev/null and b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_77edff5be681fcfa99c78d60972a41d4.dat differ diff --git a/documentation/api/phpdoc-cache-40/phpdoc-cache-file_ced1588d368e4f7039dfa925acb5fd81.dat b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_ced1588d368e4f7039dfa925acb5fd81.dat new file mode 100644 index 000000000..94cdda0c2 Binary files /dev/null and b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_ced1588d368e4f7039dfa925acb5fd81.dat differ diff --git a/documentation/api/phpdoc-cache-40/phpdoc-cache-file_d3a099ba21ba06653aea85d1121478c0.dat b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_d3a099ba21ba06653aea85d1121478c0.dat new file mode 100644 index 000000000..2b15195ca Binary files /dev/null and b/documentation/api/phpdoc-cache-40/phpdoc-cache-file_d3a099ba21ba06653aea85d1121478c0.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_74b39f7983426eeed252f37a5beb3493.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_74b39f7983426eeed252f37a5beb3493.dat new file mode 100644 index 000000000..cb87f2c4d Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_74b39f7983426eeed252f37a5beb3493.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_77002cb2f2ae103b96f8e1ce78815cf2.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_77002cb2f2ae103b96f8e1ce78815cf2.dat new file mode 100644 index 000000000..de7fdb847 Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_77002cb2f2ae103b96f8e1ce78815cf2.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_7f2bc8a8ca49bac0a3a7469c5b314a0b.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_7f2bc8a8ca49bac0a3a7469c5b314a0b.dat new file mode 100644 index 000000000..3c67bb6c0 Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_7f2bc8a8ca49bac0a3a7469c5b314a0b.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_8839516f090bda17d3901c37bb697451.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_8839516f090bda17d3901c37bb697451.dat new file mode 100644 index 000000000..88d31f41b Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_8839516f090bda17d3901c37bb697451.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_bc54c6fded86538d3d8e0ed5477d7c57.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_bc54c6fded86538d3d8e0ed5477d7c57.dat new file mode 100644 index 000000000..052286604 Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_bc54c6fded86538d3d8e0ed5477d7c57.dat differ diff --git a/documentation/api/phpdoc-cache-42/phpdoc-cache-file_c8403204edfc94d2578dde74b87c3eb5.dat b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_c8403204edfc94d2578dde74b87c3eb5.dat new file mode 100644 index 000000000..2aa769eba Binary files /dev/null and b/documentation/api/phpdoc-cache-42/phpdoc-cache-file_c8403204edfc94d2578dde74b87c3eb5.dat differ diff --git a/documentation/api/phpdoc-cache-43/phpdoc-cache-file_8502b15aacb95614d02a1d13fff4c8a8.dat b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_8502b15aacb95614d02a1d13fff4c8a8.dat new file mode 100644 index 000000000..3c6c7494f Binary files /dev/null and b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_8502b15aacb95614d02a1d13fff4c8a8.dat differ diff --git a/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c5a62a9fb86133ab6525dddb598e8f6f.dat b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c5a62a9fb86133ab6525dddb598e8f6f.dat new file mode 100644 index 000000000..3b8270a33 Binary files /dev/null and b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c5a62a9fb86133ab6525dddb598e8f6f.dat differ diff --git a/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c72c4ae0c4caf754ce9725a628d3e681.dat b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c72c4ae0c4caf754ce9725a628d3e681.dat new file mode 100644 index 000000000..86560db74 Binary files /dev/null and b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_c72c4ae0c4caf754ce9725a628d3e681.dat differ diff --git a/documentation/api/phpdoc-cache-43/phpdoc-cache-file_e72c100234106c785ab0cb0c55e7c113.dat b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_e72c100234106c785ab0cb0c55e7c113.dat new file mode 100644 index 000000000..dcbab43fe Binary files /dev/null and b/documentation/api/phpdoc-cache-43/phpdoc-cache-file_e72c100234106c785ab0cb0c55e7c113.dat differ diff --git a/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ccd4a99411b2afd88ce5be7aedf02b2f.dat b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ccd4a99411b2afd88ce5be7aedf02b2f.dat new file mode 100644 index 000000000..624f8a0b6 Binary files /dev/null and b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ccd4a99411b2afd88ce5be7aedf02b2f.dat differ diff --git a/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ce1dfcdf197ec2838514a66f1d35f8f3.dat b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ce1dfcdf197ec2838514a66f1d35f8f3.dat new file mode 100644 index 000000000..a07d2eb7d Binary files /dev/null and b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_ce1dfcdf197ec2838514a66f1d35f8f3.dat differ diff --git a/documentation/api/phpdoc-cache-45/phpdoc-cache-file_f9e923b0bdd19b55f835b5005e5dd33c.dat b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_f9e923b0bdd19b55f835b5005e5dd33c.dat new file mode 100644 index 000000000..6ea0207f3 Binary files /dev/null and b/documentation/api/phpdoc-cache-45/phpdoc-cache-file_f9e923b0bdd19b55f835b5005e5dd33c.dat differ diff --git a/documentation/api/phpdoc-cache-46/phpdoc-cache-file_4316e26ec8ac83e1458f2d56f0973ace.dat b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_4316e26ec8ac83e1458f2d56f0973ace.dat new file mode 100644 index 000000000..7e0c2b264 Binary files /dev/null and b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_4316e26ec8ac83e1458f2d56f0973ace.dat differ diff --git a/documentation/api/phpdoc-cache-46/phpdoc-cache-file_5b3a4ae3bc0899a95337a73c03154019.dat b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_5b3a4ae3bc0899a95337a73c03154019.dat new file mode 100644 index 000000000..185dd40a7 Binary files /dev/null and b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_5b3a4ae3bc0899a95337a73c03154019.dat differ diff --git a/documentation/api/phpdoc-cache-46/phpdoc-cache-file_81c3f82caec00485731187536d3f212c.dat b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_81c3f82caec00485731187536d3f212c.dat new file mode 100644 index 000000000..01e4ff759 Binary files /dev/null and b/documentation/api/phpdoc-cache-46/phpdoc-cache-file_81c3f82caec00485731187536d3f212c.dat differ diff --git a/documentation/api/phpdoc-cache-47/phpdoc-cache-file_7be25468f23507d2b7ed2fc9fa458802.dat b/documentation/api/phpdoc-cache-47/phpdoc-cache-file_7be25468f23507d2b7ed2fc9fa458802.dat new file mode 100644 index 000000000..f13caf162 Binary files /dev/null and b/documentation/api/phpdoc-cache-47/phpdoc-cache-file_7be25468f23507d2b7ed2fc9fa458802.dat differ diff --git a/documentation/api/phpdoc-cache-48/phpdoc-cache-file_161e3e40ac9d928351e9b589747b0eb2.dat b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_161e3e40ac9d928351e9b589747b0eb2.dat new file mode 100644 index 000000000..283d8ef16 Binary files /dev/null and b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_161e3e40ac9d928351e9b589747b0eb2.dat differ diff --git a/documentation/api/phpdoc-cache-48/phpdoc-cache-file_8670a874e4c0ecf4234453ee71f653e4.dat b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_8670a874e4c0ecf4234453ee71f653e4.dat new file mode 100644 index 000000000..8ae756ba7 Binary files /dev/null and b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_8670a874e4c0ecf4234453ee71f653e4.dat differ diff --git a/documentation/api/phpdoc-cache-48/phpdoc-cache-file_e719fcb9cd84d348f89322554fd84103.dat b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_e719fcb9cd84d348f89322554fd84103.dat new file mode 100644 index 000000000..990b63d14 Binary files /dev/null and b/documentation/api/phpdoc-cache-48/phpdoc-cache-file_e719fcb9cd84d348f89322554fd84103.dat differ diff --git a/documentation/api/phpdoc-cache-49/phpdoc-cache-file_0c9b11934d3c02b92201e8e1a79cde5c.dat b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_0c9b11934d3c02b92201e8e1a79cde5c.dat new file mode 100644 index 000000000..f9cf3becc Binary files /dev/null and b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_0c9b11934d3c02b92201e8e1a79cde5c.dat differ diff --git a/documentation/api/phpdoc-cache-49/phpdoc-cache-file_376468de301b8fc2f52f656b01f61ab3.dat b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_376468de301b8fc2f52f656b01f61ab3.dat new file mode 100644 index 000000000..3009e24b1 Binary files /dev/null and b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_376468de301b8fc2f52f656b01f61ab3.dat differ diff --git a/documentation/api/phpdoc-cache-49/phpdoc-cache-file_87149145bfc9c090eceeb8a72b0ed708.dat b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_87149145bfc9c090eceeb8a72b0ed708.dat new file mode 100644 index 000000000..2960182a3 Binary files /dev/null and b/documentation/api/phpdoc-cache-49/phpdoc-cache-file_87149145bfc9c090eceeb8a72b0ed708.dat differ diff --git a/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_3d9a82c71dcdcea8a4fac9d1b127375f.dat b/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_3d9a82c71dcdcea8a4fac9d1b127375f.dat new file mode 100644 index 000000000..5c15f1b77 Binary files /dev/null and b/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_3d9a82c71dcdcea8a4fac9d1b127375f.dat differ diff --git a/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_c39e09d79c027950b28ccd49c68a56fb.dat b/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_c39e09d79c027950b28ccd49c68a56fb.dat new file mode 100644 index 000000000..18e22643d Binary files /dev/null and b/documentation/api/phpdoc-cache-4a/phpdoc-cache-file_c39e09d79c027950b28ccd49c68a56fb.dat differ diff --git a/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_17bbfc732c7972748b934367f0ae2102.dat b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_17bbfc732c7972748b934367f0ae2102.dat new file mode 100644 index 000000000..a87e764da Binary files /dev/null and b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_17bbfc732c7972748b934367f0ae2102.dat differ diff --git a/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_1f9c7bec6a8a64f67781c84f79e2aeaf.dat b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_1f9c7bec6a8a64f67781c84f79e2aeaf.dat new file mode 100644 index 000000000..91fbc9793 Binary files /dev/null and b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_1f9c7bec6a8a64f67781c84f79e2aeaf.dat differ diff --git a/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_76a2d32821901260fefd8d179d0b2cf8.dat b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_76a2d32821901260fefd8d179d0b2cf8.dat new file mode 100644 index 000000000..0122ab636 Binary files /dev/null and b/documentation/api/phpdoc-cache-4b/phpdoc-cache-file_76a2d32821901260fefd8d179d0b2cf8.dat differ diff --git a/documentation/api/phpdoc-cache-4c/phpdoc-cache-file_11e8d1f22b203ff3f77b074807d1989c.dat b/documentation/api/phpdoc-cache-4c/phpdoc-cache-file_11e8d1f22b203ff3f77b074807d1989c.dat new file mode 100644 index 000000000..6deafbc85 Binary files /dev/null and b/documentation/api/phpdoc-cache-4c/phpdoc-cache-file_11e8d1f22b203ff3f77b074807d1989c.dat differ diff --git a/documentation/api/phpdoc-cache-4d/phpdoc-cache-file_68067ed9a433b448e54c34b2dacf9546.dat b/documentation/api/phpdoc-cache-4d/phpdoc-cache-file_68067ed9a433b448e54c34b2dacf9546.dat new file mode 100644 index 000000000..df3a65090 Binary files /dev/null and b/documentation/api/phpdoc-cache-4d/phpdoc-cache-file_68067ed9a433b448e54c34b2dacf9546.dat differ diff --git a/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_b5cade87826a6c30ba26a3f39f994b7f.dat b/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_b5cade87826a6c30ba26a3f39f994b7f.dat new file mode 100644 index 000000000..d142971d3 Binary files /dev/null and b/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_b5cade87826a6c30ba26a3f39f994b7f.dat differ diff --git a/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_beec8d49f09943d6cb61a62073390d2c.dat b/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_beec8d49f09943d6cb61a62073390d2c.dat new file mode 100644 index 000000000..636ab2611 Binary files /dev/null and b/documentation/api/phpdoc-cache-4e/phpdoc-cache-file_beec8d49f09943d6cb61a62073390d2c.dat differ diff --git a/documentation/api/phpdoc-cache-4f/phpdoc-cache-file_3a77cd3656257cc76be5437e6289ad7d.dat b/documentation/api/phpdoc-cache-4f/phpdoc-cache-file_3a77cd3656257cc76be5437e6289ad7d.dat new file mode 100644 index 000000000..6fb975a92 Binary files /dev/null and b/documentation/api/phpdoc-cache-4f/phpdoc-cache-file_3a77cd3656257cc76be5437e6289ad7d.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_1527dc2c1cc9f710c6af167aa75418e1.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_1527dc2c1cc9f710c6af167aa75418e1.dat new file mode 100644 index 000000000..b201120ff Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_1527dc2c1cc9f710c6af167aa75418e1.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_2114cc8bee37b7f39fd3079296f2e66b.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_2114cc8bee37b7f39fd3079296f2e66b.dat new file mode 100644 index 000000000..fea1905c7 Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_2114cc8bee37b7f39fd3079296f2e66b.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_5f88c3dc8426623895b20346510055fa.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_5f88c3dc8426623895b20346510055fa.dat new file mode 100644 index 000000000..470b956d7 Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_5f88c3dc8426623895b20346510055fa.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e1273a3ae0a27c9a7f0a57455a009a1a.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e1273a3ae0a27c9a7f0a57455a009a1a.dat new file mode 100644 index 000000000..baaa1b7a4 Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e1273a3ae0a27c9a7f0a57455a009a1a.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e5c3a717387afef8bec2a0602661629c.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e5c3a717387afef8bec2a0602661629c.dat new file mode 100644 index 000000000..e17942320 Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_e5c3a717387afef8bec2a0602661629c.dat differ diff --git a/documentation/api/phpdoc-cache-50/phpdoc-cache-file_ec9e972449549296446fbf2d90044c6b.dat b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_ec9e972449549296446fbf2d90044c6b.dat new file mode 100644 index 000000000..a13d60d64 Binary files /dev/null and b/documentation/api/phpdoc-cache-50/phpdoc-cache-file_ec9e972449549296446fbf2d90044c6b.dat differ diff --git a/documentation/api/phpdoc-cache-51/phpdoc-cache-file_1e98ae1c276b684dcdb356a95b3653c2.dat b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_1e98ae1c276b684dcdb356a95b3653c2.dat new file mode 100644 index 000000000..7d067ff7c Binary files /dev/null and b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_1e98ae1c276b684dcdb356a95b3653c2.dat differ diff --git a/documentation/api/phpdoc-cache-51/phpdoc-cache-file_48723eab5477c997100ba6cf723470d7.dat b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_48723eab5477c997100ba6cf723470d7.dat new file mode 100644 index 000000000..d3df7eacc Binary files /dev/null and b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_48723eab5477c997100ba6cf723470d7.dat differ diff --git a/documentation/api/phpdoc-cache-51/phpdoc-cache-file_b4d4cb47dcff1ecaed6474fc3f2fa735.dat b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_b4d4cb47dcff1ecaed6474fc3f2fa735.dat new file mode 100644 index 000000000..99a0d1643 Binary files /dev/null and b/documentation/api/phpdoc-cache-51/phpdoc-cache-file_b4d4cb47dcff1ecaed6474fc3f2fa735.dat differ diff --git a/documentation/api/phpdoc-cache-52/phpdoc-cache-file_bfd718148234538fb36d795e5285a8a4.dat b/documentation/api/phpdoc-cache-52/phpdoc-cache-file_bfd718148234538fb36d795e5285a8a4.dat new file mode 100644 index 000000000..28e6f102a Binary files /dev/null and b/documentation/api/phpdoc-cache-52/phpdoc-cache-file_bfd718148234538fb36d795e5285a8a4.dat differ diff --git a/documentation/api/phpdoc-cache-53/phpdoc-cache-file_62546f6285391796cf273f3a870a42b1.dat b/documentation/api/phpdoc-cache-53/phpdoc-cache-file_62546f6285391796cf273f3a870a42b1.dat new file mode 100644 index 000000000..9a8401ab0 Binary files /dev/null and b/documentation/api/phpdoc-cache-53/phpdoc-cache-file_62546f6285391796cf273f3a870a42b1.dat differ diff --git a/documentation/api/phpdoc-cache-54/phpdoc-cache-file_9b84fa5132497936afd5b75bd450786d.dat b/documentation/api/phpdoc-cache-54/phpdoc-cache-file_9b84fa5132497936afd5b75bd450786d.dat new file mode 100644 index 000000000..86a9c5cc1 Binary files /dev/null and b/documentation/api/phpdoc-cache-54/phpdoc-cache-file_9b84fa5132497936afd5b75bd450786d.dat differ diff --git a/documentation/api/phpdoc-cache-55/phpdoc-cache-file_2caed648bf6993c51f9d213485ac4655.dat b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_2caed648bf6993c51f9d213485ac4655.dat new file mode 100644 index 000000000..14b179c29 Binary files /dev/null and b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_2caed648bf6993c51f9d213485ac4655.dat differ diff --git a/documentation/api/phpdoc-cache-55/phpdoc-cache-file_8e3d4997564120dfb51d537f90d2839d.dat b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_8e3d4997564120dfb51d537f90d2839d.dat new file mode 100644 index 000000000..cb5ca5025 Binary files /dev/null and b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_8e3d4997564120dfb51d537f90d2839d.dat differ diff --git a/documentation/api/phpdoc-cache-55/phpdoc-cache-file_bfda9001c2f72efcdf5af3df2150abce.dat b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_bfda9001c2f72efcdf5af3df2150abce.dat new file mode 100644 index 000000000..402b238e3 Binary files /dev/null and b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_bfda9001c2f72efcdf5af3df2150abce.dat differ diff --git a/documentation/api/phpdoc-cache-55/phpdoc-cache-file_d735fd1e41011d24f267a2cc2764d81c.dat b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_d735fd1e41011d24f267a2cc2764d81c.dat new file mode 100644 index 000000000..a54ec4cf0 Binary files /dev/null and b/documentation/api/phpdoc-cache-55/phpdoc-cache-file_d735fd1e41011d24f267a2cc2764d81c.dat differ diff --git a/documentation/api/phpdoc-cache-56/phpdoc-cache-file_153da38668af194a2c50369167e97535.dat b/documentation/api/phpdoc-cache-56/phpdoc-cache-file_153da38668af194a2c50369167e97535.dat new file mode 100644 index 000000000..8f56c59a8 Binary files /dev/null and b/documentation/api/phpdoc-cache-56/phpdoc-cache-file_153da38668af194a2c50369167e97535.dat differ diff --git a/documentation/api/phpdoc-cache-57/phpdoc-cache-file_265ca8583b4a94151a628a902113f1aa.dat b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_265ca8583b4a94151a628a902113f1aa.dat new file mode 100644 index 000000000..28a4cfb34 Binary files /dev/null and b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_265ca8583b4a94151a628a902113f1aa.dat differ diff --git a/documentation/api/phpdoc-cache-57/phpdoc-cache-file_8099f176ba800797df1d75a31bc4c9b9.dat b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_8099f176ba800797df1d75a31bc4c9b9.dat new file mode 100644 index 000000000..4fdcc296c Binary files /dev/null and b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_8099f176ba800797df1d75a31bc4c9b9.dat differ diff --git a/documentation/api/phpdoc-cache-57/phpdoc-cache-file_de2a07b5edbba5fe88494a8a3a4b7b19.dat b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_de2a07b5edbba5fe88494a8a3a4b7b19.dat new file mode 100644 index 000000000..306209d7b Binary files /dev/null and b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_de2a07b5edbba5fe88494a8a3a4b7b19.dat differ diff --git a/documentation/api/phpdoc-cache-57/phpdoc-cache-file_ed06802b375140bdb868b8c71760c984.dat b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_ed06802b375140bdb868b8c71760c984.dat new file mode 100644 index 000000000..48a62e2ce Binary files /dev/null and b/documentation/api/phpdoc-cache-57/phpdoc-cache-file_ed06802b375140bdb868b8c71760c984.dat differ diff --git a/documentation/api/phpdoc-cache-59/phpdoc-cache-file_518852dd7eed482cb0d1eff46898db16.dat b/documentation/api/phpdoc-cache-59/phpdoc-cache-file_518852dd7eed482cb0d1eff46898db16.dat new file mode 100644 index 000000000..6c52d5898 Binary files /dev/null and b/documentation/api/phpdoc-cache-59/phpdoc-cache-file_518852dd7eed482cb0d1eff46898db16.dat differ diff --git a/documentation/api/phpdoc-cache-59/phpdoc-cache-file_81befa3ca950492857862f91919b028d.dat b/documentation/api/phpdoc-cache-59/phpdoc-cache-file_81befa3ca950492857862f91919b028d.dat new file mode 100644 index 000000000..70a3eaaf8 Binary files /dev/null and b/documentation/api/phpdoc-cache-59/phpdoc-cache-file_81befa3ca950492857862f91919b028d.dat differ diff --git a/documentation/api/phpdoc-cache-5a/phpdoc-cache-file_54acaa15173c6d7e741a264b3b1450cc.dat b/documentation/api/phpdoc-cache-5a/phpdoc-cache-file_54acaa15173c6d7e741a264b3b1450cc.dat new file mode 100644 index 000000000..8a4fa74de Binary files /dev/null and b/documentation/api/phpdoc-cache-5a/phpdoc-cache-file_54acaa15173c6d7e741a264b3b1450cc.dat differ diff --git a/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_8dc049190b0851a4366ef41220d7961c.dat b/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_8dc049190b0851a4366ef41220d7961c.dat new file mode 100644 index 000000000..8dfe84efd Binary files /dev/null and b/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_8dc049190b0851a4366ef41220d7961c.dat differ diff --git a/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_ba89f8759981e4341ca8fe0369bd2e79.dat b/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_ba89f8759981e4341ca8fe0369bd2e79.dat new file mode 100644 index 000000000..58b156203 Binary files /dev/null and b/documentation/api/phpdoc-cache-5b/phpdoc-cache-file_ba89f8759981e4341ca8fe0369bd2e79.dat differ diff --git a/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_38987d82968fd3d04f249a013f71cf42.dat b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_38987d82968fd3d04f249a013f71cf42.dat new file mode 100644 index 000000000..46b2acb5d Binary files /dev/null and b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_38987d82968fd3d04f249a013f71cf42.dat differ diff --git a/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_67279d949ff2c712efb80b943489a51f.dat b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_67279d949ff2c712efb80b943489a51f.dat new file mode 100644 index 000000000..b71b85c45 Binary files /dev/null and b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_67279d949ff2c712efb80b943489a51f.dat differ diff --git a/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_c52854c2719ab35b1f9019007a0b4d26.dat b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_c52854c2719ab35b1f9019007a0b4d26.dat new file mode 100644 index 000000000..4ab3a4abe Binary files /dev/null and b/documentation/api/phpdoc-cache-5c/phpdoc-cache-file_c52854c2719ab35b1f9019007a0b4d26.dat differ diff --git a/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1196341987f1d088fe445adf9ee01a00.dat b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1196341987f1d088fe445adf9ee01a00.dat new file mode 100644 index 000000000..760040c26 Binary files /dev/null and b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1196341987f1d088fe445adf9ee01a00.dat differ diff --git a/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1cd57578a859d683c388da42e278d979.dat b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1cd57578a859d683c388da42e278d979.dat new file mode 100644 index 000000000..4fc22a466 Binary files /dev/null and b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_1cd57578a859d683c388da42e278d979.dat differ diff --git a/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_f949443237d16cda6169dbec683cd842.dat b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_f949443237d16cda6169dbec683cd842.dat new file mode 100644 index 000000000..8063e3c14 Binary files /dev/null and b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_f949443237d16cda6169dbec683cd842.dat differ diff --git a/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_fb376647c7347524b7bfc9fb08b2c0fc.dat b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_fb376647c7347524b7bfc9fb08b2c0fc.dat new file mode 100644 index 000000000..972543df5 Binary files /dev/null and b/documentation/api/phpdoc-cache-5d/phpdoc-cache-file_fb376647c7347524b7bfc9fb08b2c0fc.dat differ diff --git a/documentation/api/phpdoc-cache-5e/phpdoc-cache-file_9a7f275f54fdf94ed8c1cf3ce2c5b22c.dat b/documentation/api/phpdoc-cache-5e/phpdoc-cache-file_9a7f275f54fdf94ed8c1cf3ce2c5b22c.dat new file mode 100644 index 000000000..d6a30cbda Binary files /dev/null and b/documentation/api/phpdoc-cache-5e/phpdoc-cache-file_9a7f275f54fdf94ed8c1cf3ce2c5b22c.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_379e394e3a5d31a903478e58d19ae0eb.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_379e394e3a5d31a903478e58d19ae0eb.dat new file mode 100644 index 000000000..b135d5cd8 Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_379e394e3a5d31a903478e58d19ae0eb.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_57448ffd6a196a7c7179c1817d17f28e.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_57448ffd6a196a7c7179c1817d17f28e.dat new file mode 100644 index 000000000..acd4d7489 Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_57448ffd6a196a7c7179c1817d17f28e.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_78c9fe00f9c6b7a957e954411a02d0fc.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_78c9fe00f9c6b7a957e954411a02d0fc.dat new file mode 100644 index 000000000..88040a5fd Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_78c9fe00f9c6b7a957e954411a02d0fc.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_bfdeeaf7f3b255279933adc0a2dc8e9d.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_bfdeeaf7f3b255279933adc0a2dc8e9d.dat new file mode 100644 index 000000000..8808e657a Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_bfdeeaf7f3b255279933adc0a2dc8e9d.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f27600e9b6eb21a3e80e96e9a840d52a.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f27600e9b6eb21a3e80e96e9a840d52a.dat new file mode 100644 index 000000000..dea8dbc3e Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f27600e9b6eb21a3e80e96e9a840d52a.dat differ diff --git a/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f2bd92c8ba1921760f213bcb5dfb2e03.dat b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f2bd92c8ba1921760f213bcb5dfb2e03.dat new file mode 100644 index 000000000..f11bd7d9c Binary files /dev/null and b/documentation/api/phpdoc-cache-60/phpdoc-cache-file_f2bd92c8ba1921760f213bcb5dfb2e03.dat differ diff --git a/documentation/api/phpdoc-cache-61/phpdoc-cache-file_23de4965a5f12f60860e319594f5ba75.dat b/documentation/api/phpdoc-cache-61/phpdoc-cache-file_23de4965a5f12f60860e319594f5ba75.dat new file mode 100644 index 000000000..e7da482e2 Binary files /dev/null and b/documentation/api/phpdoc-cache-61/phpdoc-cache-file_23de4965a5f12f60860e319594f5ba75.dat differ diff --git a/documentation/api/phpdoc-cache-61/phpdoc-cache-file_a9198888cee6d8e32189d04396395a15.dat b/documentation/api/phpdoc-cache-61/phpdoc-cache-file_a9198888cee6d8e32189d04396395a15.dat new file mode 100644 index 000000000..8f7f1f257 Binary files /dev/null and b/documentation/api/phpdoc-cache-61/phpdoc-cache-file_a9198888cee6d8e32189d04396395a15.dat differ diff --git a/documentation/api/phpdoc-cache-62/phpdoc-cache-file_153cd69a6bffacf62742676b2bccdca7.dat b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_153cd69a6bffacf62742676b2bccdca7.dat new file mode 100644 index 000000000..914e8e424 Binary files /dev/null and b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_153cd69a6bffacf62742676b2bccdca7.dat differ diff --git a/documentation/api/phpdoc-cache-62/phpdoc-cache-file_5c4be6cb3c10bcfa204f922c604f243c.dat b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_5c4be6cb3c10bcfa204f922c604f243c.dat new file mode 100644 index 000000000..0b883c2f7 Binary files /dev/null and b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_5c4be6cb3c10bcfa204f922c604f243c.dat differ diff --git a/documentation/api/phpdoc-cache-62/phpdoc-cache-file_c6d244f01756d6c040177d84516dc3bf.dat b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_c6d244f01756d6c040177d84516dc3bf.dat new file mode 100644 index 000000000..ad7fa9a28 Binary files /dev/null and b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_c6d244f01756d6c040177d84516dc3bf.dat differ diff --git a/documentation/api/phpdoc-cache-62/phpdoc-cache-file_d7f344ce4a8aa0a2b781b9dc357ab2ef.dat b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_d7f344ce4a8aa0a2b781b9dc357ab2ef.dat new file mode 100644 index 000000000..6da85a5c0 Binary files /dev/null and b/documentation/api/phpdoc-cache-62/phpdoc-cache-file_d7f344ce4a8aa0a2b781b9dc357ab2ef.dat differ diff --git a/documentation/api/phpdoc-cache-63/phpdoc-cache-file_712cfe0708c328b85f550839a4b84450.dat b/documentation/api/phpdoc-cache-63/phpdoc-cache-file_712cfe0708c328b85f550839a4b84450.dat new file mode 100644 index 000000000..3c63f7337 Binary files /dev/null and b/documentation/api/phpdoc-cache-63/phpdoc-cache-file_712cfe0708c328b85f550839a4b84450.dat differ diff --git a/documentation/api/phpdoc-cache-63/phpdoc-cache-file_d9b2f68f5eff6bc32166c903d60ce47a.dat b/documentation/api/phpdoc-cache-63/phpdoc-cache-file_d9b2f68f5eff6bc32166c903d60ce47a.dat new file mode 100644 index 000000000..0dff9eff1 Binary files /dev/null and b/documentation/api/phpdoc-cache-63/phpdoc-cache-file_d9b2f68f5eff6bc32166c903d60ce47a.dat differ diff --git a/documentation/api/phpdoc-cache-64/phpdoc-cache-file_ffdd94387cb9fcbed86d9ffeb5b1e464.dat b/documentation/api/phpdoc-cache-64/phpdoc-cache-file_ffdd94387cb9fcbed86d9ffeb5b1e464.dat new file mode 100644 index 000000000..32d6457e7 Binary files /dev/null and b/documentation/api/phpdoc-cache-64/phpdoc-cache-file_ffdd94387cb9fcbed86d9ffeb5b1e464.dat differ diff --git a/documentation/api/phpdoc-cache-65/phpdoc-cache-file_463eb127f799ef70575343db31b097c5.dat b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_463eb127f799ef70575343db31b097c5.dat new file mode 100644 index 000000000..54f11f894 Binary files /dev/null and b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_463eb127f799ef70575343db31b097c5.dat differ diff --git a/documentation/api/phpdoc-cache-65/phpdoc-cache-file_666779db155b2a9aa4a034290948d3b4.dat b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_666779db155b2a9aa4a034290948d3b4.dat new file mode 100644 index 000000000..6f177bbb5 Binary files /dev/null and b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_666779db155b2a9aa4a034290948d3b4.dat differ diff --git a/documentation/api/phpdoc-cache-65/phpdoc-cache-file_96dc254c741fe0bf02898fcd41f266e5.dat b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_96dc254c741fe0bf02898fcd41f266e5.dat new file mode 100644 index 000000000..7d573f6b2 Binary files /dev/null and b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_96dc254c741fe0bf02898fcd41f266e5.dat differ diff --git a/documentation/api/phpdoc-cache-65/phpdoc-cache-file_b9f9aa242733177d1baa1352518320f7.dat b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_b9f9aa242733177d1baa1352518320f7.dat new file mode 100644 index 000000000..71c3eae38 Binary files /dev/null and b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_b9f9aa242733177d1baa1352518320f7.dat differ diff --git a/documentation/api/phpdoc-cache-65/phpdoc-cache-file_f1eef8a364408a28c4f6fbcb04e2abd6.dat b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_f1eef8a364408a28c4f6fbcb04e2abd6.dat new file mode 100644 index 000000000..cb211e774 Binary files /dev/null and b/documentation/api/phpdoc-cache-65/phpdoc-cache-file_f1eef8a364408a28c4f6fbcb04e2abd6.dat differ diff --git a/documentation/api/phpdoc-cache-66/phpdoc-cache-file_49b9a83d88ed6ac6ce947948e5128253.dat b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_49b9a83d88ed6ac6ce947948e5128253.dat new file mode 100644 index 000000000..84ab85e5d Binary files /dev/null and b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_49b9a83d88ed6ac6ce947948e5128253.dat differ diff --git a/documentation/api/phpdoc-cache-66/phpdoc-cache-file_8b282fece4ff426d63def3e2755ef29d.dat b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_8b282fece4ff426d63def3e2755ef29d.dat new file mode 100644 index 000000000..b6cbbeba5 Binary files /dev/null and b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_8b282fece4ff426d63def3e2755ef29d.dat differ diff --git a/documentation/api/phpdoc-cache-66/phpdoc-cache-file_a3aca9e4405527d0e80efb5fb7b717e3.dat b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_a3aca9e4405527d0e80efb5fb7b717e3.dat new file mode 100644 index 000000000..566d6a9ca Binary files /dev/null and b/documentation/api/phpdoc-cache-66/phpdoc-cache-file_a3aca9e4405527d0e80efb5fb7b717e3.dat differ diff --git a/documentation/api/phpdoc-cache-67/phpdoc-cache-file_1a0d7d2c2d0461b1a92b366983018b91.dat b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_1a0d7d2c2d0461b1a92b366983018b91.dat new file mode 100644 index 000000000..0e0db4b6a Binary files /dev/null and b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_1a0d7d2c2d0461b1a92b366983018b91.dat differ diff --git a/documentation/api/phpdoc-cache-67/phpdoc-cache-file_9f63a3b4d034fed3412f8655f3dfce63.dat b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_9f63a3b4d034fed3412f8655f3dfce63.dat new file mode 100644 index 000000000..d659647fc Binary files /dev/null and b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_9f63a3b4d034fed3412f8655f3dfce63.dat differ diff --git a/documentation/api/phpdoc-cache-67/phpdoc-cache-file_a93f224a0a103b2136c63efc6a43ea2f.dat b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_a93f224a0a103b2136c63efc6a43ea2f.dat new file mode 100644 index 000000000..85262c730 Binary files /dev/null and b/documentation/api/phpdoc-cache-67/phpdoc-cache-file_a93f224a0a103b2136c63efc6a43ea2f.dat differ diff --git a/documentation/api/phpdoc-cache-68/phpdoc-cache-file_a7ae430df768839d2a3d1facf554747b.dat b/documentation/api/phpdoc-cache-68/phpdoc-cache-file_a7ae430df768839d2a3d1facf554747b.dat new file mode 100644 index 000000000..d4b3ddb99 Binary files /dev/null and b/documentation/api/phpdoc-cache-68/phpdoc-cache-file_a7ae430df768839d2a3d1facf554747b.dat differ diff --git a/documentation/api/phpdoc-cache-68/phpdoc-cache-file_f4d64791a28397538b26ee77b65aa45d.dat b/documentation/api/phpdoc-cache-68/phpdoc-cache-file_f4d64791a28397538b26ee77b65aa45d.dat new file mode 100644 index 000000000..5a9cd787a Binary files /dev/null and b/documentation/api/phpdoc-cache-68/phpdoc-cache-file_f4d64791a28397538b26ee77b65aa45d.dat differ diff --git a/documentation/api/phpdoc-cache-69/phpdoc-cache-file_a9c9c970874393f83785b553c1db540d.dat b/documentation/api/phpdoc-cache-69/phpdoc-cache-file_a9c9c970874393f83785b553c1db540d.dat new file mode 100644 index 000000000..89ef504a0 Binary files /dev/null and b/documentation/api/phpdoc-cache-69/phpdoc-cache-file_a9c9c970874393f83785b553c1db540d.dat differ diff --git a/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_0f9322d20b689b7de793fe6189d23a87.dat b/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_0f9322d20b689b7de793fe6189d23a87.dat new file mode 100644 index 000000000..83f789946 Binary files /dev/null and b/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_0f9322d20b689b7de793fe6189d23a87.dat differ diff --git a/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_5259932b3c2c69e5dcb3d6f8ca48ad3f.dat b/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_5259932b3c2c69e5dcb3d6f8ca48ad3f.dat new file mode 100644 index 000000000..ae23823b2 Binary files /dev/null and b/documentation/api/phpdoc-cache-6a/phpdoc-cache-file_5259932b3c2c69e5dcb3d6f8ca48ad3f.dat differ diff --git a/documentation/api/phpdoc-cache-6b/phpdoc-cache-file_ad8a22907bd459f834ae922fefee13ff.dat b/documentation/api/phpdoc-cache-6b/phpdoc-cache-file_ad8a22907bd459f834ae922fefee13ff.dat new file mode 100644 index 000000000..7ea03c7d3 Binary files /dev/null and b/documentation/api/phpdoc-cache-6b/phpdoc-cache-file_ad8a22907bd459f834ae922fefee13ff.dat differ diff --git a/documentation/api/phpdoc-cache-6c/phpdoc-cache-file_4788ccb38c007b3a51d414b4cd3838c7.dat b/documentation/api/phpdoc-cache-6c/phpdoc-cache-file_4788ccb38c007b3a51d414b4cd3838c7.dat new file mode 100644 index 000000000..37f9ac03c Binary files /dev/null and b/documentation/api/phpdoc-cache-6c/phpdoc-cache-file_4788ccb38c007b3a51d414b4cd3838c7.dat differ diff --git a/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_87df11053b32e5f5aba8d8c659376cdb.dat b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_87df11053b32e5f5aba8d8c659376cdb.dat new file mode 100644 index 000000000..beba8b3f8 Binary files /dev/null and b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_87df11053b32e5f5aba8d8c659376cdb.dat differ diff --git a/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_e88fe8fd974956d41968ff4a23da50ac.dat b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_e88fe8fd974956d41968ff4a23da50ac.dat new file mode 100644 index 000000000..d52f936b0 Binary files /dev/null and b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_e88fe8fd974956d41968ff4a23da50ac.dat differ diff --git a/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_f8dab4a1983d117f2fa25749fb8acf15.dat b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_f8dab4a1983d117f2fa25749fb8acf15.dat new file mode 100644 index 000000000..bad3d65d9 Binary files /dev/null and b/documentation/api/phpdoc-cache-6e/phpdoc-cache-file_f8dab4a1983d117f2fa25749fb8acf15.dat differ diff --git a/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_1d16fb5ce9e873e731cbac47c16271d2.dat b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_1d16fb5ce9e873e731cbac47c16271d2.dat new file mode 100644 index 000000000..03ab0c4e1 Binary files /dev/null and b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_1d16fb5ce9e873e731cbac47c16271d2.dat differ diff --git a/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6de0d4782199124c0d31fe24751ce1f0.dat b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6de0d4782199124c0d31fe24751ce1f0.dat new file mode 100644 index 000000000..370d5dae0 Binary files /dev/null and b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6de0d4782199124c0d31fe24751ce1f0.dat differ diff --git a/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6f8dcef8220cf838bfebe7f48d741bfc.dat b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6f8dcef8220cf838bfebe7f48d741bfc.dat new file mode 100644 index 000000000..c90d948e5 Binary files /dev/null and b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_6f8dcef8220cf838bfebe7f48d741bfc.dat differ diff --git a/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_94ac07d4c9804bcaf0996ffdf38dc33e.dat b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_94ac07d4c9804bcaf0996ffdf38dc33e.dat new file mode 100644 index 000000000..367003a58 Binary files /dev/null and b/documentation/api/phpdoc-cache-6f/phpdoc-cache-file_94ac07d4c9804bcaf0996ffdf38dc33e.dat differ diff --git a/documentation/api/phpdoc-cache-70/phpdoc-cache-file_032040fe7ff6a8176af63eed59a31be5.dat b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_032040fe7ff6a8176af63eed59a31be5.dat new file mode 100644 index 000000000..c90671829 Binary files /dev/null and b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_032040fe7ff6a8176af63eed59a31be5.dat differ diff --git a/documentation/api/phpdoc-cache-70/phpdoc-cache-file_564fef84b6f4b39641ed1abd98c5de53.dat b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_564fef84b6f4b39641ed1abd98c5de53.dat new file mode 100644 index 000000000..bcfcbbb54 Binary files /dev/null and b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_564fef84b6f4b39641ed1abd98c5de53.dat differ diff --git a/documentation/api/phpdoc-cache-70/phpdoc-cache-file_a64bf16ab8995f4020897c7953eb19fb.dat b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_a64bf16ab8995f4020897c7953eb19fb.dat new file mode 100644 index 000000000..ceca25ed8 Binary files /dev/null and b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_a64bf16ab8995f4020897c7953eb19fb.dat differ diff --git a/documentation/api/phpdoc-cache-70/phpdoc-cache-file_fd586479d27a66b7bcdb6838cb24463f.dat b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_fd586479d27a66b7bcdb6838cb24463f.dat new file mode 100644 index 000000000..0749b9067 Binary files /dev/null and b/documentation/api/phpdoc-cache-70/phpdoc-cache-file_fd586479d27a66b7bcdb6838cb24463f.dat differ diff --git a/documentation/api/phpdoc-cache-71/phpdoc-cache-file_3001d0952bbbf956f85549060bf62b59.dat b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_3001d0952bbbf956f85549060bf62b59.dat new file mode 100644 index 000000000..bebc088df Binary files /dev/null and b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_3001d0952bbbf956f85549060bf62b59.dat differ diff --git a/documentation/api/phpdoc-cache-71/phpdoc-cache-file_86fa049a5c3b6602bd437df446722eb0.dat b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_86fa049a5c3b6602bd437df446722eb0.dat new file mode 100644 index 000000000..5e0d3679d Binary files /dev/null and b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_86fa049a5c3b6602bd437df446722eb0.dat differ diff --git a/documentation/api/phpdoc-cache-71/phpdoc-cache-file_ed6696532144113fb5bdce1c6e462845.dat b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_ed6696532144113fb5bdce1c6e462845.dat new file mode 100644 index 000000000..6ad49c78c Binary files /dev/null and b/documentation/api/phpdoc-cache-71/phpdoc-cache-file_ed6696532144113fb5bdce1c6e462845.dat differ diff --git a/documentation/api/phpdoc-cache-72/phpdoc-cache-file_87cdfbd1bd89e39b3bcc144c00e9fee2.dat b/documentation/api/phpdoc-cache-72/phpdoc-cache-file_87cdfbd1bd89e39b3bcc144c00e9fee2.dat new file mode 100644 index 000000000..412facf0a Binary files /dev/null and b/documentation/api/phpdoc-cache-72/phpdoc-cache-file_87cdfbd1bd89e39b3bcc144c00e9fee2.dat differ diff --git a/documentation/api/phpdoc-cache-72/phpdoc-cache-file_b22cc5dffe281c681972fa1820376a93.dat b/documentation/api/phpdoc-cache-72/phpdoc-cache-file_b22cc5dffe281c681972fa1820376a93.dat new file mode 100644 index 000000000..4dede24b3 Binary files /dev/null and b/documentation/api/phpdoc-cache-72/phpdoc-cache-file_b22cc5dffe281c681972fa1820376a93.dat differ diff --git a/documentation/api/phpdoc-cache-75/phpdoc-cache-file_2e18deff0f70be30da2fcead2fa8a91c.dat b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_2e18deff0f70be30da2fcead2fa8a91c.dat new file mode 100644 index 000000000..d938139ad Binary files /dev/null and b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_2e18deff0f70be30da2fcead2fa8a91c.dat differ diff --git a/documentation/api/phpdoc-cache-75/phpdoc-cache-file_d37381f42fe4a89455a1ad38320e0d0a.dat b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_d37381f42fe4a89455a1ad38320e0d0a.dat new file mode 100644 index 000000000..a6735d42c Binary files /dev/null and b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_d37381f42fe4a89455a1ad38320e0d0a.dat differ diff --git a/documentation/api/phpdoc-cache-75/phpdoc-cache-file_fe598efa32170691afe4afec07282f2f.dat b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_fe598efa32170691afe4afec07282f2f.dat new file mode 100644 index 000000000..a3a8f6221 Binary files /dev/null and b/documentation/api/phpdoc-cache-75/phpdoc-cache-file_fe598efa32170691afe4afec07282f2f.dat differ diff --git a/documentation/api/phpdoc-cache-76/phpdoc-cache-file_477651f0c06e2a97ef46c26303c83789.dat b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_477651f0c06e2a97ef46c26303c83789.dat new file mode 100644 index 000000000..b64faffc4 Binary files /dev/null and b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_477651f0c06e2a97ef46c26303c83789.dat differ diff --git a/documentation/api/phpdoc-cache-76/phpdoc-cache-file_6c0eba6cfdbe50dd2612dd2a6456679e.dat b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_6c0eba6cfdbe50dd2612dd2a6456679e.dat new file mode 100644 index 000000000..8cf62bc61 Binary files /dev/null and b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_6c0eba6cfdbe50dd2612dd2a6456679e.dat differ diff --git a/documentation/api/phpdoc-cache-76/phpdoc-cache-file_e54be5cd6ae417e6bde5e49bf78fc8a5.dat b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_e54be5cd6ae417e6bde5e49bf78fc8a5.dat new file mode 100644 index 000000000..94c243194 Binary files /dev/null and b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_e54be5cd6ae417e6bde5e49bf78fc8a5.dat differ diff --git a/documentation/api/phpdoc-cache-76/phpdoc-cache-file_eaf347a7cfb37b1e9de53d3cbbecaf00.dat b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_eaf347a7cfb37b1e9de53d3cbbecaf00.dat new file mode 100644 index 000000000..b8718b0b3 Binary files /dev/null and b/documentation/api/phpdoc-cache-76/phpdoc-cache-file_eaf347a7cfb37b1e9de53d3cbbecaf00.dat differ diff --git a/documentation/api/phpdoc-cache-77/phpdoc-cache-file_28eb435dc21513613e135f126cc9bffc.dat b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_28eb435dc21513613e135f126cc9bffc.dat new file mode 100644 index 000000000..f24845e26 Binary files /dev/null and b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_28eb435dc21513613e135f126cc9bffc.dat differ diff --git a/documentation/api/phpdoc-cache-77/phpdoc-cache-file_41d42f14673b8707af5cfd0cde4d50f8.dat b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_41d42f14673b8707af5cfd0cde4d50f8.dat new file mode 100644 index 000000000..f82a4595a Binary files /dev/null and b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_41d42f14673b8707af5cfd0cde4d50f8.dat differ diff --git a/documentation/api/phpdoc-cache-77/phpdoc-cache-file_89b5ebea3f869c2a1d46a80c06db8db7.dat b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_89b5ebea3f869c2a1d46a80c06db8db7.dat new file mode 100644 index 000000000..88d6a7ab1 Binary files /dev/null and b/documentation/api/phpdoc-cache-77/phpdoc-cache-file_89b5ebea3f869c2a1d46a80c06db8db7.dat differ diff --git a/documentation/api/phpdoc-cache-7a/phpdoc-cache-file_5b0ab43d271611e7a6d11a1dbf1e4796.dat b/documentation/api/phpdoc-cache-7a/phpdoc-cache-file_5b0ab43d271611e7a6d11a1dbf1e4796.dat new file mode 100644 index 000000000..0eff4688b Binary files /dev/null and b/documentation/api/phpdoc-cache-7a/phpdoc-cache-file_5b0ab43d271611e7a6d11a1dbf1e4796.dat differ diff --git a/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_2e8508586995501a549beae1a4647725.dat b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_2e8508586995501a549beae1a4647725.dat new file mode 100644 index 000000000..bd798e412 Binary files /dev/null and b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_2e8508586995501a549beae1a4647725.dat differ diff --git a/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_78b51c776b4c75b7b0c9049b834aa2e5.dat b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_78b51c776b4c75b7b0c9049b834aa2e5.dat new file mode 100644 index 000000000..b4400a585 Binary files /dev/null and b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_78b51c776b4c75b7b0c9049b834aa2e5.dat differ diff --git a/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_fe1290f87ac2d5d10fed8567ab40c7a5.dat b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_fe1290f87ac2d5d10fed8567ab40c7a5.dat new file mode 100644 index 000000000..2ff1cfb04 Binary files /dev/null and b/documentation/api/phpdoc-cache-7b/phpdoc-cache-file_fe1290f87ac2d5d10fed8567ab40c7a5.dat differ diff --git a/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_4eb04607d218dd7c6677e24f62e6edc0.dat b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_4eb04607d218dd7c6677e24f62e6edc0.dat new file mode 100644 index 000000000..fcbace8e0 Binary files /dev/null and b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_4eb04607d218dd7c6677e24f62e6edc0.dat differ diff --git a/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_8e07983131762fb20e499700b71a1219.dat b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_8e07983131762fb20e499700b71a1219.dat new file mode 100644 index 000000000..e146a6dee Binary files /dev/null and b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_8e07983131762fb20e499700b71a1219.dat differ diff --git a/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_e7daf205771906393bfe7d398160f38d.dat b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_e7daf205771906393bfe7d398160f38d.dat new file mode 100644 index 000000000..62d20a571 Binary files /dev/null and b/documentation/api/phpdoc-cache-7c/phpdoc-cache-file_e7daf205771906393bfe7d398160f38d.dat differ diff --git a/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_7130e2dbaad58171195cead9b8bc089d.dat b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_7130e2dbaad58171195cead9b8bc089d.dat new file mode 100644 index 000000000..076fc7d29 Binary files /dev/null and b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_7130e2dbaad58171195cead9b8bc089d.dat differ diff --git a/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_a851e76ebec7d4de014b7fd4de7abce6.dat b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_a851e76ebec7d4de014b7fd4de7abce6.dat new file mode 100644 index 000000000..2a9ae21c1 Binary files /dev/null and b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_a851e76ebec7d4de014b7fd4de7abce6.dat differ diff --git a/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_d64843a6f314e1fdae527ef69f7c1766.dat b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_d64843a6f314e1fdae527ef69f7c1766.dat new file mode 100644 index 000000000..68de36729 Binary files /dev/null and b/documentation/api/phpdoc-cache-7d/phpdoc-cache-file_d64843a6f314e1fdae527ef69f7c1766.dat differ diff --git a/documentation/api/phpdoc-cache-7f/phpdoc-cache-file_9c4af47d405c88a1c2e336315aa400dd.dat b/documentation/api/phpdoc-cache-7f/phpdoc-cache-file_9c4af47d405c88a1c2e336315aa400dd.dat new file mode 100644 index 000000000..fc639def6 Binary files /dev/null and b/documentation/api/phpdoc-cache-7f/phpdoc-cache-file_9c4af47d405c88a1c2e336315aa400dd.dat differ diff --git a/documentation/api/phpdoc-cache-81/phpdoc-cache-file_6d3d9179ba4dbfcb2b3419fe3db2d9dc.dat b/documentation/api/phpdoc-cache-81/phpdoc-cache-file_6d3d9179ba4dbfcb2b3419fe3db2d9dc.dat new file mode 100644 index 000000000..b7d4fec1c Binary files /dev/null and b/documentation/api/phpdoc-cache-81/phpdoc-cache-file_6d3d9179ba4dbfcb2b3419fe3db2d9dc.dat differ diff --git a/documentation/api/phpdoc-cache-82/phpdoc-cache-file_7a580c1fac5a63de8eb2c3209418296c.dat b/documentation/api/phpdoc-cache-82/phpdoc-cache-file_7a580c1fac5a63de8eb2c3209418296c.dat new file mode 100644 index 000000000..815238dd7 Binary files /dev/null and b/documentation/api/phpdoc-cache-82/phpdoc-cache-file_7a580c1fac5a63de8eb2c3209418296c.dat differ diff --git a/documentation/api/phpdoc-cache-83/phpdoc-cache-file_76dad14a45875cf702363fa8b054d87f.dat b/documentation/api/phpdoc-cache-83/phpdoc-cache-file_76dad14a45875cf702363fa8b054d87f.dat new file mode 100644 index 000000000..9e1c1f206 Binary files /dev/null and b/documentation/api/phpdoc-cache-83/phpdoc-cache-file_76dad14a45875cf702363fa8b054d87f.dat differ diff --git a/documentation/api/phpdoc-cache-83/phpdoc-cache-file_e99fd17d3df1c45208298c0f2a6f34a4.dat b/documentation/api/phpdoc-cache-83/phpdoc-cache-file_e99fd17d3df1c45208298c0f2a6f34a4.dat new file mode 100644 index 000000000..65d085a9d Binary files /dev/null and b/documentation/api/phpdoc-cache-83/phpdoc-cache-file_e99fd17d3df1c45208298c0f2a6f34a4.dat differ diff --git a/documentation/api/phpdoc-cache-84/phpdoc-cache-file_4b168eae208833ebf400477cd8b7f1da.dat b/documentation/api/phpdoc-cache-84/phpdoc-cache-file_4b168eae208833ebf400477cd8b7f1da.dat new file mode 100644 index 000000000..e215e012e Binary files /dev/null and b/documentation/api/phpdoc-cache-84/phpdoc-cache-file_4b168eae208833ebf400477cd8b7f1da.dat differ diff --git a/documentation/api/phpdoc-cache-84/phpdoc-cache-file_e45492dbf633cb1c5a1d797b0f9cde09.dat b/documentation/api/phpdoc-cache-84/phpdoc-cache-file_e45492dbf633cb1c5a1d797b0f9cde09.dat new file mode 100644 index 000000000..0a4fc85ca Binary files /dev/null and b/documentation/api/phpdoc-cache-84/phpdoc-cache-file_e45492dbf633cb1c5a1d797b0f9cde09.dat differ diff --git a/documentation/api/phpdoc-cache-85/phpdoc-cache-file_90baa780b15082cb32a46948a35af30b.dat b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_90baa780b15082cb32a46948a35af30b.dat new file mode 100644 index 000000000..27b5d10e1 Binary files /dev/null and b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_90baa780b15082cb32a46948a35af30b.dat differ diff --git a/documentation/api/phpdoc-cache-85/phpdoc-cache-file_ac92d0d7971b04cf909e01b758d9b871.dat b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_ac92d0d7971b04cf909e01b758d9b871.dat new file mode 100644 index 000000000..17066fbd6 Binary files /dev/null and b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_ac92d0d7971b04cf909e01b758d9b871.dat differ diff --git a/documentation/api/phpdoc-cache-85/phpdoc-cache-file_f6074e681c91b7479ff69de01ba9b2be.dat b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_f6074e681c91b7479ff69de01ba9b2be.dat new file mode 100644 index 000000000..09a57bed6 Binary files /dev/null and b/documentation/api/phpdoc-cache-85/phpdoc-cache-file_f6074e681c91b7479ff69de01ba9b2be.dat differ diff --git a/documentation/api/phpdoc-cache-86/phpdoc-cache-file_0a13cec268c28bf3ab569cbaf6122f66.dat b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_0a13cec268c28bf3ab569cbaf6122f66.dat new file mode 100644 index 000000000..1f4104cd3 Binary files /dev/null and b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_0a13cec268c28bf3ab569cbaf6122f66.dat differ diff --git a/documentation/api/phpdoc-cache-86/phpdoc-cache-file_28c7ab8baa692e1e5b301b9dba8dabf2.dat b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_28c7ab8baa692e1e5b301b9dba8dabf2.dat new file mode 100644 index 000000000..22c8ac2eb Binary files /dev/null and b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_28c7ab8baa692e1e5b301b9dba8dabf2.dat differ diff --git a/documentation/api/phpdoc-cache-86/phpdoc-cache-file_2a3cd2590fa6970e83eae6d1fd31c415.dat b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_2a3cd2590fa6970e83eae6d1fd31c415.dat new file mode 100644 index 000000000..a2af75e96 Binary files /dev/null and b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_2a3cd2590fa6970e83eae6d1fd31c415.dat differ diff --git a/documentation/api/phpdoc-cache-86/phpdoc-cache-file_595401c319f922be4035fa7a8e2eba90.dat b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_595401c319f922be4035fa7a8e2eba90.dat new file mode 100644 index 000000000..52d9688b3 Binary files /dev/null and b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_595401c319f922be4035fa7a8e2eba90.dat differ diff --git a/documentation/api/phpdoc-cache-86/phpdoc-cache-file_981ad2bfa8152bbe4f2782d9b1264e74.dat b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_981ad2bfa8152bbe4f2782d9b1264e74.dat new file mode 100644 index 000000000..2f9c7c162 Binary files /dev/null and b/documentation/api/phpdoc-cache-86/phpdoc-cache-file_981ad2bfa8152bbe4f2782d9b1264e74.dat differ diff --git a/documentation/api/phpdoc-cache-87/phpdoc-cache-file_310808aabccccc005dc598c973284368.dat b/documentation/api/phpdoc-cache-87/phpdoc-cache-file_310808aabccccc005dc598c973284368.dat new file mode 100644 index 000000000..d72cc5096 Binary files /dev/null and b/documentation/api/phpdoc-cache-87/phpdoc-cache-file_310808aabccccc005dc598c973284368.dat differ diff --git a/documentation/api/phpdoc-cache-88/phpdoc-cache-file_e03b27f0d571cec660594d2edfe3a18b.dat b/documentation/api/phpdoc-cache-88/phpdoc-cache-file_e03b27f0d571cec660594d2edfe3a18b.dat new file mode 100644 index 000000000..1f3ae6441 Binary files /dev/null and b/documentation/api/phpdoc-cache-88/phpdoc-cache-file_e03b27f0d571cec660594d2edfe3a18b.dat differ diff --git a/documentation/api/phpdoc-cache-89/phpdoc-cache-file_2588210a4eaa98ab0ceba6bf117f3769.dat b/documentation/api/phpdoc-cache-89/phpdoc-cache-file_2588210a4eaa98ab0ceba6bf117f3769.dat new file mode 100644 index 000000000..d25183848 Binary files /dev/null and b/documentation/api/phpdoc-cache-89/phpdoc-cache-file_2588210a4eaa98ab0ceba6bf117f3769.dat differ diff --git a/documentation/api/phpdoc-cache-89/phpdoc-cache-file_c7e40c6faec5d3bd4404fe05fab403e1.dat b/documentation/api/phpdoc-cache-89/phpdoc-cache-file_c7e40c6faec5d3bd4404fe05fab403e1.dat new file mode 100644 index 000000000..11f9c3847 Binary files /dev/null and b/documentation/api/phpdoc-cache-89/phpdoc-cache-file_c7e40c6faec5d3bd4404fe05fab403e1.dat differ diff --git a/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_90356fc7d21fc62a1c31125b1c2e9b9d.dat b/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_90356fc7d21fc62a1c31125b1c2e9b9d.dat new file mode 100644 index 000000000..256a86f50 Binary files /dev/null and b/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_90356fc7d21fc62a1c31125b1c2e9b9d.dat differ diff --git a/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_bd5bca3419002d82ba8b652a12613ac5.dat b/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_bd5bca3419002d82ba8b652a12613ac5.dat new file mode 100644 index 000000000..9d7a6c1aa Binary files /dev/null and b/documentation/api/phpdoc-cache-8a/phpdoc-cache-file_bd5bca3419002d82ba8b652a12613ac5.dat differ diff --git a/documentation/api/phpdoc-cache-8b/phpdoc-cache-file_2bbf39de00b9b08a774c109d58730bb2.dat b/documentation/api/phpdoc-cache-8b/phpdoc-cache-file_2bbf39de00b9b08a774c109d58730bb2.dat new file mode 100644 index 000000000..cf72e3675 Binary files /dev/null and b/documentation/api/phpdoc-cache-8b/phpdoc-cache-file_2bbf39de00b9b08a774c109d58730bb2.dat differ diff --git a/documentation/api/phpdoc-cache-8c/phpdoc-cache-file_ab612f4beffc45a735429ceba320d7e4.dat b/documentation/api/phpdoc-cache-8c/phpdoc-cache-file_ab612f4beffc45a735429ceba320d7e4.dat new file mode 100644 index 000000000..ad3f6e854 Binary files /dev/null and b/documentation/api/phpdoc-cache-8c/phpdoc-cache-file_ab612f4beffc45a735429ceba320d7e4.dat differ diff --git a/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_e41776294ed84855f0d66f901f633532.dat b/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_e41776294ed84855f0d66f901f633532.dat new file mode 100644 index 000000000..3bebe9b42 Binary files /dev/null and b/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_e41776294ed84855f0d66f901f633532.dat differ diff --git a/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_f24e2bcad15662857d6ef32a28556868.dat b/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_f24e2bcad15662857d6ef32a28556868.dat new file mode 100644 index 000000000..e804c85a8 Binary files /dev/null and b/documentation/api/phpdoc-cache-8d/phpdoc-cache-file_f24e2bcad15662857d6ef32a28556868.dat differ diff --git a/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_17e761c597bea3c96cf06a421a5d2125.dat b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_17e761c597bea3c96cf06a421a5d2125.dat new file mode 100644 index 000000000..2e8bd2ad4 Binary files /dev/null and b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_17e761c597bea3c96cf06a421a5d2125.dat differ diff --git a/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_20fb86f7dc4aa0f901520e8725bbf76b.dat b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_20fb86f7dc4aa0f901520e8725bbf76b.dat new file mode 100644 index 000000000..57ceea136 Binary files /dev/null and b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_20fb86f7dc4aa0f901520e8725bbf76b.dat differ diff --git a/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_3fc197bb3318d6394f912d8c3e43f714.dat b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_3fc197bb3318d6394f912d8c3e43f714.dat new file mode 100644 index 000000000..0cba583c2 Binary files /dev/null and b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_3fc197bb3318d6394f912d8c3e43f714.dat differ diff --git a/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_978f05607568dd0934f6808509403306.dat b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_978f05607568dd0934f6808509403306.dat new file mode 100644 index 000000000..8e00c152e Binary files /dev/null and b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_978f05607568dd0934f6808509403306.dat differ diff --git a/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_b2787684a75c8163c7ff5fd4ed794d87.dat b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_b2787684a75c8163c7ff5fd4ed794d87.dat new file mode 100644 index 000000000..f47ef87a9 Binary files /dev/null and b/documentation/api/phpdoc-cache-8e/phpdoc-cache-file_b2787684a75c8163c7ff5fd4ed794d87.dat differ diff --git a/documentation/api/phpdoc-cache-8f/phpdoc-cache-file_eabdc0d2647eedba42666329eeeb5db2.dat b/documentation/api/phpdoc-cache-8f/phpdoc-cache-file_eabdc0d2647eedba42666329eeeb5db2.dat new file mode 100644 index 000000000..99f46f348 Binary files /dev/null and b/documentation/api/phpdoc-cache-8f/phpdoc-cache-file_eabdc0d2647eedba42666329eeeb5db2.dat differ diff --git a/documentation/api/phpdoc-cache-90/phpdoc-cache-file_7d752e3930320a8c302df09e25b3d8f9.dat b/documentation/api/phpdoc-cache-90/phpdoc-cache-file_7d752e3930320a8c302df09e25b3d8f9.dat new file mode 100644 index 000000000..4233a6ac1 Binary files /dev/null and b/documentation/api/phpdoc-cache-90/phpdoc-cache-file_7d752e3930320a8c302df09e25b3d8f9.dat differ diff --git a/documentation/api/phpdoc-cache-91/phpdoc-cache-file_27bd415892dbe7d741af622523297e51.dat b/documentation/api/phpdoc-cache-91/phpdoc-cache-file_27bd415892dbe7d741af622523297e51.dat new file mode 100644 index 000000000..759f2b35d Binary files /dev/null and b/documentation/api/phpdoc-cache-91/phpdoc-cache-file_27bd415892dbe7d741af622523297e51.dat differ diff --git a/documentation/api/phpdoc-cache-91/phpdoc-cache-file_2a2b50586c1441227bbf360075b64781.dat b/documentation/api/phpdoc-cache-91/phpdoc-cache-file_2a2b50586c1441227bbf360075b64781.dat new file mode 100644 index 000000000..a02f48840 Binary files /dev/null and b/documentation/api/phpdoc-cache-91/phpdoc-cache-file_2a2b50586c1441227bbf360075b64781.dat differ diff --git a/documentation/api/phpdoc-cache-92/phpdoc-cache-file_001874c869ba8ff6bfb49f44e6dbef4d.dat b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_001874c869ba8ff6bfb49f44e6dbef4d.dat new file mode 100644 index 000000000..9af728fc7 Binary files /dev/null and b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_001874c869ba8ff6bfb49f44e6dbef4d.dat differ diff --git a/documentation/api/phpdoc-cache-92/phpdoc-cache-file_098f014315ca5f2c8ad200e651ab0459.dat b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_098f014315ca5f2c8ad200e651ab0459.dat new file mode 100644 index 000000000..2cc4421df Binary files /dev/null and b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_098f014315ca5f2c8ad200e651ab0459.dat differ diff --git a/documentation/api/phpdoc-cache-92/phpdoc-cache-file_bff09e4df187ac8404306cfccdb7e847.dat b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_bff09e4df187ac8404306cfccdb7e847.dat new file mode 100644 index 000000000..0732417fa Binary files /dev/null and b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_bff09e4df187ac8404306cfccdb7e847.dat differ diff --git a/documentation/api/phpdoc-cache-92/phpdoc-cache-file_e9b32716249c268108e2f0da780d1d31.dat b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_e9b32716249c268108e2f0da780d1d31.dat new file mode 100644 index 000000000..ed9df9a4b Binary files /dev/null and b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_e9b32716249c268108e2f0da780d1d31.dat differ diff --git a/documentation/api/phpdoc-cache-92/phpdoc-cache-file_f0df3fcdc7103603d89036aa3217da22.dat b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_f0df3fcdc7103603d89036aa3217da22.dat new file mode 100644 index 000000000..a16fb8982 Binary files /dev/null and b/documentation/api/phpdoc-cache-92/phpdoc-cache-file_f0df3fcdc7103603d89036aa3217da22.dat differ diff --git a/documentation/api/phpdoc-cache-93/phpdoc-cache-file_71979648591c3805baeb045799086f2f.dat b/documentation/api/phpdoc-cache-93/phpdoc-cache-file_71979648591c3805baeb045799086f2f.dat new file mode 100644 index 000000000..b3259ab98 Binary files /dev/null and b/documentation/api/phpdoc-cache-93/phpdoc-cache-file_71979648591c3805baeb045799086f2f.dat differ diff --git a/documentation/api/phpdoc-cache-94/phpdoc-cache-file_bd3b11b03ff1c8b6714d5cb596c8fbc8.dat b/documentation/api/phpdoc-cache-94/phpdoc-cache-file_bd3b11b03ff1c8b6714d5cb596c8fbc8.dat new file mode 100644 index 000000000..feb86ad4b Binary files /dev/null and b/documentation/api/phpdoc-cache-94/phpdoc-cache-file_bd3b11b03ff1c8b6714d5cb596c8fbc8.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_1a2920f2b88aa74a049ad5a12455311a.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_1a2920f2b88aa74a049ad5a12455311a.dat new file mode 100644 index 000000000..7a61c8b89 Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_1a2920f2b88aa74a049ad5a12455311a.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_539599c8028a41a3a729e5e4a442f507.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_539599c8028a41a3a729e5e4a442f507.dat new file mode 100644 index 000000000..4dd3d617e Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_539599c8028a41a3a729e5e4a442f507.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_69142c676de46436b765d4e622586d20.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_69142c676de46436b765d4e622586d20.dat new file mode 100644 index 000000000..5658e0f45 Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_69142c676de46436b765d4e622586d20.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_71fa6d0762b17a6a79d0d101b9d6d9f8.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_71fa6d0762b17a6a79d0d101b9d6d9f8.dat new file mode 100644 index 000000000..2ccfb2b10 Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_71fa6d0762b17a6a79d0d101b9d6d9f8.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_924f9df85b1dc16dd0db37774e169188.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_924f9df85b1dc16dd0db37774e169188.dat new file mode 100644 index 000000000..277830971 Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_924f9df85b1dc16dd0db37774e169188.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_d48ba48994eaab834e914f2c280a7611.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_d48ba48994eaab834e914f2c280a7611.dat new file mode 100644 index 000000000..fc7ad4831 Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_d48ba48994eaab834e914f2c280a7611.dat differ diff --git a/documentation/api/phpdoc-cache-95/phpdoc-cache-file_dad91a5977bc7b5c8e0b3e12ef986d43.dat b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_dad91a5977bc7b5c8e0b3e12ef986d43.dat new file mode 100644 index 000000000..036a03dcd Binary files /dev/null and b/documentation/api/phpdoc-cache-95/phpdoc-cache-file_dad91a5977bc7b5c8e0b3e12ef986d43.dat differ diff --git a/documentation/api/phpdoc-cache-96/phpdoc-cache-file_03d25ecdd94cfb98266da6a3d09416e0.dat b/documentation/api/phpdoc-cache-96/phpdoc-cache-file_03d25ecdd94cfb98266da6a3d09416e0.dat new file mode 100644 index 000000000..7847e1e21 Binary files /dev/null and b/documentation/api/phpdoc-cache-96/phpdoc-cache-file_03d25ecdd94cfb98266da6a3d09416e0.dat differ diff --git a/documentation/api/phpdoc-cache-97/phpdoc-cache-file_19b2bb5e0e587e3cf8564cebc2b94361.dat b/documentation/api/phpdoc-cache-97/phpdoc-cache-file_19b2bb5e0e587e3cf8564cebc2b94361.dat new file mode 100644 index 000000000..1c07e898c Binary files /dev/null and b/documentation/api/phpdoc-cache-97/phpdoc-cache-file_19b2bb5e0e587e3cf8564cebc2b94361.dat differ diff --git a/documentation/api/phpdoc-cache-99/phpdoc-cache-file_2c801babeb718d18e06501fbbe1d1838.dat b/documentation/api/phpdoc-cache-99/phpdoc-cache-file_2c801babeb718d18e06501fbbe1d1838.dat new file mode 100644 index 000000000..a4af6d27a Binary files /dev/null and b/documentation/api/phpdoc-cache-99/phpdoc-cache-file_2c801babeb718d18e06501fbbe1d1838.dat differ diff --git a/documentation/api/phpdoc-cache-99/phpdoc-cache-file_3ce37803a9398288b7deef0fbc3072a2.dat b/documentation/api/phpdoc-cache-99/phpdoc-cache-file_3ce37803a9398288b7deef0fbc3072a2.dat new file mode 100644 index 000000000..d1e388150 Binary files /dev/null and b/documentation/api/phpdoc-cache-99/phpdoc-cache-file_3ce37803a9398288b7deef0fbc3072a2.dat differ diff --git a/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_3025d1431ee3f39ae8cbfeef228ddc46.dat b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_3025d1431ee3f39ae8cbfeef228ddc46.dat new file mode 100644 index 000000000..f886840b2 Binary files /dev/null and b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_3025d1431ee3f39ae8cbfeef228ddc46.dat differ diff --git a/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_7bb0f26b6a76d8480fcecbdddcc61903.dat b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_7bb0f26b6a76d8480fcecbdddcc61903.dat new file mode 100644 index 000000000..aae0a0f1c Binary files /dev/null and b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_7bb0f26b6a76d8480fcecbdddcc61903.dat differ diff --git a/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_fe0dd3d9e971a36d0bb08fdceee304fe.dat b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_fe0dd3d9e971a36d0bb08fdceee304fe.dat new file mode 100644 index 000000000..855495903 Binary files /dev/null and b/documentation/api/phpdoc-cache-9a/phpdoc-cache-file_fe0dd3d9e971a36d0bb08fdceee304fe.dat differ diff --git a/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_667030a6ba31ab9769d709f85f0cc4ed.dat b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_667030a6ba31ab9769d709f85f0cc4ed.dat new file mode 100644 index 000000000..d2ecb79fa Binary files /dev/null and b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_667030a6ba31ab9769d709f85f0cc4ed.dat differ diff --git a/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_9a5728434d3ff543f3238ba6f1896d90.dat b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_9a5728434d3ff543f3238ba6f1896d90.dat new file mode 100644 index 000000000..eb8f1237e Binary files /dev/null and b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_9a5728434d3ff543f3238ba6f1896d90.dat differ diff --git a/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f16ec8229134591521ebccbc1bce733b.dat b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f16ec8229134591521ebccbc1bce733b.dat new file mode 100644 index 000000000..ea14a88b4 Binary files /dev/null and b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f16ec8229134591521ebccbc1bce733b.dat differ diff --git a/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f35d63fdd0c61b19e855a52e5751b11c.dat b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f35d63fdd0c61b19e855a52e5751b11c.dat new file mode 100644 index 000000000..de989e1eb Binary files /dev/null and b/documentation/api/phpdoc-cache-9b/phpdoc-cache-file_f35d63fdd0c61b19e855a52e5751b11c.dat differ diff --git a/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_2eed456aae5c12fd6c64f6ff9a1d3f8f.dat b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_2eed456aae5c12fd6c64f6ff9a1d3f8f.dat new file mode 100644 index 000000000..2809ed726 Binary files /dev/null and b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_2eed456aae5c12fd6c64f6ff9a1d3f8f.dat differ diff --git a/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_373bd293ae65392dcfb4d6927ed40ed2.dat b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_373bd293ae65392dcfb4d6927ed40ed2.dat new file mode 100644 index 000000000..b8a39ac7f Binary files /dev/null and b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_373bd293ae65392dcfb4d6927ed40ed2.dat differ diff --git a/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a4afc2ceabad03c06c6e89571a7bfb3a.dat b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a4afc2ceabad03c06c6e89571a7bfb3a.dat new file mode 100644 index 000000000..354ede762 Binary files /dev/null and b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a4afc2ceabad03c06c6e89571a7bfb3a.dat differ diff --git a/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a98d172a2076a20cf975e9656861ffb5.dat b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a98d172a2076a20cf975e9656861ffb5.dat new file mode 100644 index 000000000..d7d4f8520 Binary files /dev/null and b/documentation/api/phpdoc-cache-9d/phpdoc-cache-file_a98d172a2076a20cf975e9656861ffb5.dat differ diff --git a/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_058020bf90295290eace62c7c96e8640.dat b/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_058020bf90295290eace62c7c96e8640.dat new file mode 100644 index 000000000..0ec5e4417 Binary files /dev/null and b/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_058020bf90295290eace62c7c96e8640.dat differ diff --git a/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_0e35661d92c7a3148a2742edef746bc9.dat b/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_0e35661d92c7a3148a2742edef746bc9.dat new file mode 100644 index 000000000..51500745f Binary files /dev/null and b/documentation/api/phpdoc-cache-9e/phpdoc-cache-file_0e35661d92c7a3148a2742edef746bc9.dat differ diff --git a/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_b60eef7b1dfeb7c7aff4cb8565a7998c.dat b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_b60eef7b1dfeb7c7aff4cb8565a7998c.dat new file mode 100644 index 000000000..221281728 Binary files /dev/null and b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_b60eef7b1dfeb7c7aff4cb8565a7998c.dat differ diff --git a/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_baa011958d6b29108bc7537647647842.dat b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_baa011958d6b29108bc7537647647842.dat new file mode 100644 index 000000000..9538e77ad Binary files /dev/null and b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_baa011958d6b29108bc7537647647842.dat differ diff --git a/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_e16b96c26107e0094c1dad6087d59218.dat b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_e16b96c26107e0094c1dad6087d59218.dat new file mode 100644 index 000000000..3e2e8d45d Binary files /dev/null and b/documentation/api/phpdoc-cache-9f/phpdoc-cache-file_e16b96c26107e0094c1dad6087d59218.dat differ diff --git a/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_72d214bdfa93e2f11d25220dd1e03365.dat b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_72d214bdfa93e2f11d25220dd1e03365.dat new file mode 100644 index 000000000..c8c842e2f Binary files /dev/null and b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_72d214bdfa93e2f11d25220dd1e03365.dat differ diff --git a/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_cb9ecf145e41b72e8a363a01a724be52.dat b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_cb9ecf145e41b72e8a363a01a724be52.dat new file mode 100644 index 000000000..e0cb06af1 Binary files /dev/null and b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_cb9ecf145e41b72e8a363a01a724be52.dat differ diff --git a/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_f68d8c545eaf3ed5df2001c9a5582476.dat b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_f68d8c545eaf3ed5df2001c9a5582476.dat new file mode 100644 index 000000000..95a606ab4 Binary files /dev/null and b/documentation/api/phpdoc-cache-a0/phpdoc-cache-file_f68d8c545eaf3ed5df2001c9a5582476.dat differ diff --git a/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_d50c9c249e89b745af3d57b97cebb5be.dat b/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_d50c9c249e89b745af3d57b97cebb5be.dat new file mode 100644 index 000000000..17f7f47cf Binary files /dev/null and b/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_d50c9c249e89b745af3d57b97cebb5be.dat differ diff --git a/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_de00bc57e7a6ad486a4c8eec53d6537c.dat b/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_de00bc57e7a6ad486a4c8eec53d6537c.dat new file mode 100644 index 000000000..d32a0ae75 Binary files /dev/null and b/documentation/api/phpdoc-cache-a1/phpdoc-cache-file_de00bc57e7a6ad486a4c8eec53d6537c.dat differ diff --git a/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_249d9c5ce81469183652279b95cbb3d4.dat b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_249d9c5ce81469183652279b95cbb3d4.dat new file mode 100644 index 000000000..e9ae0b4ad Binary files /dev/null and b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_249d9c5ce81469183652279b95cbb3d4.dat differ diff --git a/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_70c6e640be54b8f19715bf73e1851c97.dat b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_70c6e640be54b8f19715bf73e1851c97.dat new file mode 100644 index 000000000..ea2658de2 Binary files /dev/null and b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_70c6e640be54b8f19715bf73e1851c97.dat differ diff --git a/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_c6ab0854bbaf48e42a1bcc0d737c40d3.dat b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_c6ab0854bbaf48e42a1bcc0d737c40d3.dat new file mode 100644 index 000000000..2598f04ba Binary files /dev/null and b/documentation/api/phpdoc-cache-a2/phpdoc-cache-file_c6ab0854bbaf48e42a1bcc0d737c40d3.dat differ diff --git a/documentation/api/phpdoc-cache-a3/phpdoc-cache-file_d17f0ac4d56453940215963be301c1fb.dat b/documentation/api/phpdoc-cache-a3/phpdoc-cache-file_d17f0ac4d56453940215963be301c1fb.dat new file mode 100644 index 000000000..f4b28d709 Binary files /dev/null and b/documentation/api/phpdoc-cache-a3/phpdoc-cache-file_d17f0ac4d56453940215963be301c1fb.dat differ diff --git a/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_09f058ab9a0a7896ee7efe8c31635a60.dat b/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_09f058ab9a0a7896ee7efe8c31635a60.dat new file mode 100644 index 000000000..6c3167499 Binary files /dev/null and b/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_09f058ab9a0a7896ee7efe8c31635a60.dat differ diff --git a/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_c06e703304433ab822d9398187644920.dat b/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_c06e703304433ab822d9398187644920.dat new file mode 100644 index 000000000..267ee1ca9 Binary files /dev/null and b/documentation/api/phpdoc-cache-a4/phpdoc-cache-file_c06e703304433ab822d9398187644920.dat differ diff --git a/documentation/api/phpdoc-cache-a5/phpdoc-cache-file_c44d22ca571d1e061065787ce0f50244.dat b/documentation/api/phpdoc-cache-a5/phpdoc-cache-file_c44d22ca571d1e061065787ce0f50244.dat new file mode 100644 index 000000000..459b69d58 Binary files /dev/null and b/documentation/api/phpdoc-cache-a5/phpdoc-cache-file_c44d22ca571d1e061065787ce0f50244.dat differ diff --git a/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_4d84bc452321d0c342a879acfd1ea489.dat b/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_4d84bc452321d0c342a879acfd1ea489.dat new file mode 100644 index 000000000..77f29dca7 Binary files /dev/null and b/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_4d84bc452321d0c342a879acfd1ea489.dat differ diff --git a/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_53e5d92c73540ae602bc81bd2da4804a.dat b/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_53e5d92c73540ae602bc81bd2da4804a.dat new file mode 100644 index 000000000..43e2b762c Binary files /dev/null and b/documentation/api/phpdoc-cache-a6/phpdoc-cache-file_53e5d92c73540ae602bc81bd2da4804a.dat differ diff --git a/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_303c1888a3e3e32976d9137a0d9ba68d.dat b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_303c1888a3e3e32976d9137a0d9ba68d.dat new file mode 100644 index 000000000..c6f4affbe Binary files /dev/null and b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_303c1888a3e3e32976d9137a0d9ba68d.dat differ diff --git a/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_7048ad59c348674e8b18feaa3788eef1.dat b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_7048ad59c348674e8b18feaa3788eef1.dat new file mode 100644 index 000000000..6312517e3 Binary files /dev/null and b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_7048ad59c348674e8b18feaa3788eef1.dat differ diff --git a/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_81ba9244ef192c6363fe0a78c32f22f4.dat b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_81ba9244ef192c6363fe0a78c32f22f4.dat new file mode 100644 index 000000000..bfec41835 Binary files /dev/null and b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_81ba9244ef192c6363fe0a78c32f22f4.dat differ diff --git a/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_a74e5f99a47a0937ac1a53865d02413c.dat b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_a74e5f99a47a0937ac1a53865d02413c.dat new file mode 100644 index 000000000..23cbf708e Binary files /dev/null and b/documentation/api/phpdoc-cache-a8/phpdoc-cache-file_a74e5f99a47a0937ac1a53865d02413c.dat differ diff --git a/documentation/api/phpdoc-cache-a9/phpdoc-cache-file_1404ce868a57e755d8613387c9173a44.dat b/documentation/api/phpdoc-cache-a9/phpdoc-cache-file_1404ce868a57e755d8613387c9173a44.dat new file mode 100644 index 000000000..216e1dbfb Binary files /dev/null and b/documentation/api/phpdoc-cache-a9/phpdoc-cache-file_1404ce868a57e755d8613387c9173a44.dat differ diff --git a/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_06b7bd4eecbc82d423284c77f8582c4f.dat b/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_06b7bd4eecbc82d423284c77f8582c4f.dat new file mode 100644 index 000000000..f79cef929 Binary files /dev/null and b/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_06b7bd4eecbc82d423284c77f8582c4f.dat differ diff --git a/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_b5e8c703f6461c94c29a42922379891e.dat b/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_b5e8c703f6461c94c29a42922379891e.dat new file mode 100644 index 000000000..565bce70f Binary files /dev/null and b/documentation/api/phpdoc-cache-aa/phpdoc-cache-file_b5e8c703f6461c94c29a42922379891e.dat differ diff --git a/documentation/api/phpdoc-cache-ab/phpdoc-cache-file_ad71e75ed6a6de01f969312f674490eb.dat b/documentation/api/phpdoc-cache-ab/phpdoc-cache-file_ad71e75ed6a6de01f969312f674490eb.dat new file mode 100644 index 000000000..93051480c Binary files /dev/null and b/documentation/api/phpdoc-cache-ab/phpdoc-cache-file_ad71e75ed6a6de01f969312f674490eb.dat differ diff --git a/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_a765e8a3d2d73799c1630410b3d12292.dat b/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_a765e8a3d2d73799c1630410b3d12292.dat new file mode 100644 index 000000000..9e34f535e Binary files /dev/null and b/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_a765e8a3d2d73799c1630410b3d12292.dat differ diff --git a/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_f8cd27cd3d6feae6705ee394a55cc4a9.dat b/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_f8cd27cd3d6feae6705ee394a55cc4a9.dat new file mode 100644 index 000000000..f3c500d3f Binary files /dev/null and b/documentation/api/phpdoc-cache-ac/phpdoc-cache-file_f8cd27cd3d6feae6705ee394a55cc4a9.dat differ diff --git a/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_8be10b28d6b9a8845628067bc3003aee.dat b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_8be10b28d6b9a8845628067bc3003aee.dat new file mode 100644 index 000000000..75f9d8f52 Binary files /dev/null and b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_8be10b28d6b9a8845628067bc3003aee.dat differ diff --git a/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_c6405d9d4a56dc493976e90814bfd006.dat b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_c6405d9d4a56dc493976e90814bfd006.dat new file mode 100644 index 000000000..4c23c1388 Binary files /dev/null and b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_c6405d9d4a56dc493976e90814bfd006.dat differ diff --git a/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_dad1c23b1ba6b6199a826d619f5c3cd4.dat b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_dad1c23b1ba6b6199a826d619f5c3cd4.dat new file mode 100644 index 000000000..700d1ed38 Binary files /dev/null and b/documentation/api/phpdoc-cache-ad/phpdoc-cache-file_dad1c23b1ba6b6199a826d619f5c3cd4.dat differ diff --git a/documentation/api/phpdoc-cache-ae/phpdoc-cache-file_53018a2e292d21d53922fdd0a95a0b70.dat b/documentation/api/phpdoc-cache-ae/phpdoc-cache-file_53018a2e292d21d53922fdd0a95a0b70.dat new file mode 100644 index 000000000..32d155940 Binary files /dev/null and b/documentation/api/phpdoc-cache-ae/phpdoc-cache-file_53018a2e292d21d53922fdd0a95a0b70.dat differ diff --git a/documentation/api/phpdoc-cache-af/phpdoc-cache-file_aec997689db7e6ebdce5aefb5b0059bf.dat b/documentation/api/phpdoc-cache-af/phpdoc-cache-file_aec997689db7e6ebdce5aefb5b0059bf.dat new file mode 100644 index 000000000..bf947791d Binary files /dev/null and b/documentation/api/phpdoc-cache-af/phpdoc-cache-file_aec997689db7e6ebdce5aefb5b0059bf.dat differ diff --git a/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_54553547b125d220031f0adad4c07db7.dat b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_54553547b125d220031f0adad4c07db7.dat new file mode 100644 index 000000000..f2f66c33a Binary files /dev/null and b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_54553547b125d220031f0adad4c07db7.dat differ diff --git a/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_a7c0b94d50f6779dc8fc564ca39a29db.dat b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_a7c0b94d50f6779dc8fc564ca39a29db.dat new file mode 100644 index 000000000..c52850a23 Binary files /dev/null and b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_a7c0b94d50f6779dc8fc564ca39a29db.dat differ diff --git a/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_df5fd81f148e63b72d403b2cbe41d004.dat b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_df5fd81f148e63b72d403b2cbe41d004.dat new file mode 100644 index 000000000..2e6b3ff4d Binary files /dev/null and b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_df5fd81f148e63b72d403b2cbe41d004.dat differ diff --git a/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_e83dffcfab4c1218d91b5ef16305f8ff.dat b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_e83dffcfab4c1218d91b5ef16305f8ff.dat new file mode 100644 index 000000000..1a3e2c0db Binary files /dev/null and b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_e83dffcfab4c1218d91b5ef16305f8ff.dat differ diff --git a/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_f9ec7357bc43ebe67981a2e44a5679ac.dat b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_f9ec7357bc43ebe67981a2e44a5679ac.dat new file mode 100644 index 000000000..e0b045eb1 Binary files /dev/null and b/documentation/api/phpdoc-cache-b0/phpdoc-cache-file_f9ec7357bc43ebe67981a2e44a5679ac.dat differ diff --git a/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_2d903c88be44ca17ec8b71aa781a1e0a.dat b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_2d903c88be44ca17ec8b71aa781a1e0a.dat new file mode 100644 index 000000000..ef5abd44a Binary files /dev/null and b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_2d903c88be44ca17ec8b71aa781a1e0a.dat differ diff --git a/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_45f2180412565c4bf60ea21c0af5e7ef.dat b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_45f2180412565c4bf60ea21c0af5e7ef.dat new file mode 100644 index 000000000..384ec41b0 Binary files /dev/null and b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_45f2180412565c4bf60ea21c0af5e7ef.dat differ diff --git a/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_92f94af42174bc48e07b2ef1b26243fc.dat b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_92f94af42174bc48e07b2ef1b26243fc.dat new file mode 100644 index 000000000..e09d32d3a Binary files /dev/null and b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_92f94af42174bc48e07b2ef1b26243fc.dat differ diff --git a/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_e48e3d5584953d960eca5b8faec12806.dat b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_e48e3d5584953d960eca5b8faec12806.dat new file mode 100644 index 000000000..e0d116316 Binary files /dev/null and b/documentation/api/phpdoc-cache-b1/phpdoc-cache-file_e48e3d5584953d960eca5b8faec12806.dat differ diff --git a/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_56032457852b10c317a0a5d3abce7ecd.dat b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_56032457852b10c317a0a5d3abce7ecd.dat new file mode 100644 index 000000000..0dfa10453 Binary files /dev/null and b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_56032457852b10c317a0a5d3abce7ecd.dat differ diff --git a/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_82ef8362417be856c412ece70d6a27c4.dat b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_82ef8362417be856c412ece70d6a27c4.dat new file mode 100644 index 000000000..ea6f94980 Binary files /dev/null and b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_82ef8362417be856c412ece70d6a27c4.dat differ diff --git a/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_9b4641d0d30b48372d325d8df45aebee.dat b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_9b4641d0d30b48372d325d8df45aebee.dat new file mode 100644 index 000000000..699be68d0 Binary files /dev/null and b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_9b4641d0d30b48372d325d8df45aebee.dat differ diff --git a/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_b5286780ab7e1ed9d4b2c7fdca51c80b.dat b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_b5286780ab7e1ed9d4b2c7fdca51c80b.dat new file mode 100644 index 000000000..8fa23b6f2 Binary files /dev/null and b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_b5286780ab7e1ed9d4b2c7fdca51c80b.dat differ diff --git a/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_bbaf0945e586ff8aec30ff1ac02ff0c1.dat b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_bbaf0945e586ff8aec30ff1ac02ff0c1.dat new file mode 100644 index 000000000..fe1e7de98 Binary files /dev/null and b/documentation/api/phpdoc-cache-b2/phpdoc-cache-file_bbaf0945e586ff8aec30ff1ac02ff0c1.dat differ diff --git a/documentation/api/phpdoc-cache-b3/phpdoc-cache-file_381bd91ae7e753f5c906353d612850c3.dat b/documentation/api/phpdoc-cache-b3/phpdoc-cache-file_381bd91ae7e753f5c906353d612850c3.dat new file mode 100644 index 000000000..576e1c8b3 Binary files /dev/null and b/documentation/api/phpdoc-cache-b3/phpdoc-cache-file_381bd91ae7e753f5c906353d612850c3.dat differ diff --git a/documentation/api/phpdoc-cache-b4/phpdoc-cache-file_61c2cc01e63e3a9310fb25d8184f1474.dat b/documentation/api/phpdoc-cache-b4/phpdoc-cache-file_61c2cc01e63e3a9310fb25d8184f1474.dat new file mode 100644 index 000000000..02d2c2722 Binary files /dev/null and b/documentation/api/phpdoc-cache-b4/phpdoc-cache-file_61c2cc01e63e3a9310fb25d8184f1474.dat differ diff --git a/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_341c1251f5fabfadcbdf25448182fd1f.dat b/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_341c1251f5fabfadcbdf25448182fd1f.dat new file mode 100644 index 000000000..37efc90e8 Binary files /dev/null and b/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_341c1251f5fabfadcbdf25448182fd1f.dat differ diff --git a/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_e8361481a946720cc3fca9b0eef6bdd3.dat b/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_e8361481a946720cc3fca9b0eef6bdd3.dat new file mode 100644 index 000000000..9e12ede87 Binary files /dev/null and b/documentation/api/phpdoc-cache-b5/phpdoc-cache-file_e8361481a946720cc3fca9b0eef6bdd3.dat differ diff --git a/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_25e2dc3620bb5c25a8e0dfc16bc8018a.dat b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_25e2dc3620bb5c25a8e0dfc16bc8018a.dat new file mode 100644 index 000000000..8e72920de Binary files /dev/null and b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_25e2dc3620bb5c25a8e0dfc16bc8018a.dat differ diff --git a/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_acfb74dc7b6eb971194717281541cffe.dat b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_acfb74dc7b6eb971194717281541cffe.dat new file mode 100644 index 000000000..a50b40ae1 Binary files /dev/null and b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_acfb74dc7b6eb971194717281541cffe.dat differ diff --git a/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_ddbff69e71e45edc7fde89f07f3ef622.dat b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_ddbff69e71e45edc7fde89f07f3ef622.dat new file mode 100644 index 000000000..e80136327 Binary files /dev/null and b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_ddbff69e71e45edc7fde89f07f3ef622.dat differ diff --git a/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_f33a671c8c2339c92e05d21813fbf2a7.dat b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_f33a671c8c2339c92e05d21813fbf2a7.dat new file mode 100644 index 000000000..819b6d7ec Binary files /dev/null and b/documentation/api/phpdoc-cache-b6/phpdoc-cache-file_f33a671c8c2339c92e05d21813fbf2a7.dat differ diff --git a/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_19dd5c158894d5a0a5f36dc20ad66168.dat b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_19dd5c158894d5a0a5f36dc20ad66168.dat new file mode 100644 index 000000000..c19c9f812 Binary files /dev/null and b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_19dd5c158894d5a0a5f36dc20ad66168.dat differ diff --git a/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_8f0202b61e2ff2e1bd518fdbd689ef11.dat b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_8f0202b61e2ff2e1bd518fdbd689ef11.dat new file mode 100644 index 000000000..cdbb9ba31 Binary files /dev/null and b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_8f0202b61e2ff2e1bd518fdbd689ef11.dat differ diff --git a/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_b56741bcf2430151a1c51877691e8e09.dat b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_b56741bcf2430151a1c51877691e8e09.dat new file mode 100644 index 000000000..179f7bb9e Binary files /dev/null and b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_b56741bcf2430151a1c51877691e8e09.dat differ diff --git a/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_cb0527bc040fa2bfebe446c6137c032c.dat b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_cb0527bc040fa2bfebe446c6137c032c.dat new file mode 100644 index 000000000..c186fc82a Binary files /dev/null and b/documentation/api/phpdoc-cache-b7/phpdoc-cache-file_cb0527bc040fa2bfebe446c6137c032c.dat differ diff --git a/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_4e69ed45e89e0a4274c5b5bcd6cf9855.dat b/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_4e69ed45e89e0a4274c5b5bcd6cf9855.dat new file mode 100644 index 000000000..c789ccac3 Binary files /dev/null and b/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_4e69ed45e89e0a4274c5b5bcd6cf9855.dat differ diff --git a/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_8d98df2d7ef73046550856b8b497a503.dat b/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_8d98df2d7ef73046550856b8b497a503.dat new file mode 100644 index 000000000..8a7f12a28 Binary files /dev/null and b/documentation/api/phpdoc-cache-b9/phpdoc-cache-file_8d98df2d7ef73046550856b8b497a503.dat differ diff --git a/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_98bd3bd73ff95fec4a079d75fe4eac7a.dat b/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_98bd3bd73ff95fec4a079d75fe4eac7a.dat new file mode 100644 index 000000000..f49379789 Binary files /dev/null and b/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_98bd3bd73ff95fec4a079d75fe4eac7a.dat differ diff --git a/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_e2f5619dbbbe5bbc1013830c42b3e60c.dat b/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_e2f5619dbbbe5bbc1013830c42b3e60c.dat new file mode 100644 index 000000000..13dd13e8c Binary files /dev/null and b/documentation/api/phpdoc-cache-ba/phpdoc-cache-file_e2f5619dbbbe5bbc1013830c42b3e60c.dat differ diff --git a/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_4339a925830605888174df2aac61da88.dat b/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_4339a925830605888174df2aac61da88.dat new file mode 100644 index 000000000..0a61257f9 Binary files /dev/null and b/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_4339a925830605888174df2aac61da88.dat differ diff --git a/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_f3fc1578bca22e423e9fbc036b231de8.dat b/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_f3fc1578bca22e423e9fbc036b231de8.dat new file mode 100644 index 000000000..1ec4b8173 Binary files /dev/null and b/documentation/api/phpdoc-cache-bb/phpdoc-cache-file_f3fc1578bca22e423e9fbc036b231de8.dat differ diff --git a/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_034a553b8341e07a5b249062b2cdcab8.dat b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_034a553b8341e07a5b249062b2cdcab8.dat new file mode 100644 index 000000000..c3183c3b9 Binary files /dev/null and b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_034a553b8341e07a5b249062b2cdcab8.dat differ diff --git a/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_0db51a104c58ca274c3e13da181aa1e9.dat b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_0db51a104c58ca274c3e13da181aa1e9.dat new file mode 100644 index 000000000..31b2eff27 Binary files /dev/null and b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_0db51a104c58ca274c3e13da181aa1e9.dat differ diff --git a/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_ae4673ec0d76423bab73c7deb35a1ef7.dat b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_ae4673ec0d76423bab73c7deb35a1ef7.dat new file mode 100644 index 000000000..fbc9f0790 Binary files /dev/null and b/documentation/api/phpdoc-cache-bc/phpdoc-cache-file_ae4673ec0d76423bab73c7deb35a1ef7.dat differ diff --git a/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_28be5fc1d4dbbfc72b44041c17d5782d.dat b/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_28be5fc1d4dbbfc72b44041c17d5782d.dat new file mode 100644 index 000000000..6a28f73cd Binary files /dev/null and b/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_28be5fc1d4dbbfc72b44041c17d5782d.dat differ diff --git a/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_f160c827be3733ca58d37f96174bf37f.dat b/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_f160c827be3733ca58d37f96174bf37f.dat new file mode 100644 index 000000000..56386cded Binary files /dev/null and b/documentation/api/phpdoc-cache-bd/phpdoc-cache-file_f160c827be3733ca58d37f96174bf37f.dat differ diff --git a/documentation/api/phpdoc-cache-be/phpdoc-cache-file_173074ee8ecde0bdba49c506218af590.dat b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_173074ee8ecde0bdba49c506218af590.dat new file mode 100644 index 000000000..3833f495d Binary files /dev/null and b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_173074ee8ecde0bdba49c506218af590.dat differ diff --git a/documentation/api/phpdoc-cache-be/phpdoc-cache-file_1a5bd1927e52aa46eda3ee2d4d9aa782.dat b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_1a5bd1927e52aa46eda3ee2d4d9aa782.dat new file mode 100644 index 000000000..86a174975 Binary files /dev/null and b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_1a5bd1927e52aa46eda3ee2d4d9aa782.dat differ diff --git a/documentation/api/phpdoc-cache-be/phpdoc-cache-file_537dd66071daf7b1f201e865f5a69e60.dat b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_537dd66071daf7b1f201e865f5a69e60.dat new file mode 100644 index 000000000..44a03ec16 Binary files /dev/null and b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_537dd66071daf7b1f201e865f5a69e60.dat differ diff --git a/documentation/api/phpdoc-cache-be/phpdoc-cache-file_97301bc07a4f6c0adf36d55bfc34e9a0.dat b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_97301bc07a4f6c0adf36d55bfc34e9a0.dat new file mode 100644 index 000000000..23b0b1748 Binary files /dev/null and b/documentation/api/phpdoc-cache-be/phpdoc-cache-file_97301bc07a4f6c0adf36d55bfc34e9a0.dat differ diff --git a/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_6585e1ff3990b013bf8fa0797120e0ac.dat b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_6585e1ff3990b013bf8fa0797120e0ac.dat new file mode 100644 index 000000000..043d3989b Binary files /dev/null and b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_6585e1ff3990b013bf8fa0797120e0ac.dat differ diff --git a/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_aeef55d440741c2078281be61435c0f9.dat b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_aeef55d440741c2078281be61435c0f9.dat new file mode 100644 index 000000000..cfb44d45e Binary files /dev/null and b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_aeef55d440741c2078281be61435c0f9.dat differ diff --git a/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_b742f8afeb585ced571bb17c94a87b06.dat b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_b742f8afeb585ced571bb17c94a87b06.dat new file mode 100644 index 000000000..df33ebc1c Binary files /dev/null and b/documentation/api/phpdoc-cache-bf/phpdoc-cache-file_b742f8afeb585ced571bb17c94a87b06.dat differ diff --git a/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_8bcdad9a794c99d3fe09f6b2781d763b.dat b/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_8bcdad9a794c99d3fe09f6b2781d763b.dat new file mode 100644 index 000000000..f9d4f9d0e Binary files /dev/null and b/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_8bcdad9a794c99d3fe09f6b2781d763b.dat differ diff --git a/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_c98ecba6856d0a16319c54975a4d8cd2.dat b/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_c98ecba6856d0a16319c54975a4d8cd2.dat new file mode 100644 index 000000000..5eb7f81da Binary files /dev/null and b/documentation/api/phpdoc-cache-c0/phpdoc-cache-file_c98ecba6856d0a16319c54975a4d8cd2.dat differ diff --git a/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_473dd263539df3841a100cf5babd3ecb.dat b/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_473dd263539df3841a100cf5babd3ecb.dat new file mode 100644 index 000000000..e26e4a878 Binary files /dev/null and b/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_473dd263539df3841a100cf5babd3ecb.dat differ diff --git a/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_c66fa1cee9480f4f183bdaab58eb8a0f.dat b/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_c66fa1cee9480f4f183bdaab58eb8a0f.dat new file mode 100644 index 000000000..7ed4204b0 Binary files /dev/null and b/documentation/api/phpdoc-cache-c1/phpdoc-cache-file_c66fa1cee9480f4f183bdaab58eb8a0f.dat differ diff --git a/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_166e2eceb48f8e45b2221f08f97e09c2.dat b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_166e2eceb48f8e45b2221f08f97e09c2.dat new file mode 100644 index 000000000..8e9038034 Binary files /dev/null and b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_166e2eceb48f8e45b2221f08f97e09c2.dat differ diff --git a/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_1f28ea1b11a50e09709c41b50a1c2ac9.dat b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_1f28ea1b11a50e09709c41b50a1c2ac9.dat new file mode 100644 index 000000000..763122653 Binary files /dev/null and b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_1f28ea1b11a50e09709c41b50a1c2ac9.dat differ diff --git a/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_737aef3f7942ab2d3d5762fbd03e787d.dat b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_737aef3f7942ab2d3d5762fbd03e787d.dat new file mode 100644 index 000000000..b9bb0dfd1 Binary files /dev/null and b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_737aef3f7942ab2d3d5762fbd03e787d.dat differ diff --git a/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_f1ec9903350e78f6c822fb787834d9db.dat b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_f1ec9903350e78f6c822fb787834d9db.dat new file mode 100644 index 000000000..6eb797d9b Binary files /dev/null and b/documentation/api/phpdoc-cache-c2/phpdoc-cache-file_f1ec9903350e78f6c822fb787834d9db.dat differ diff --git a/documentation/api/phpdoc-cache-c4/phpdoc-cache-file_252bcfc2477342e4b2b21db26151cac3.dat b/documentation/api/phpdoc-cache-c4/phpdoc-cache-file_252bcfc2477342e4b2b21db26151cac3.dat new file mode 100644 index 000000000..0702f2162 Binary files /dev/null and b/documentation/api/phpdoc-cache-c4/phpdoc-cache-file_252bcfc2477342e4b2b21db26151cac3.dat differ diff --git a/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_1562e2cb83b8a00def4d4ffd7f61d6c6.dat b/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_1562e2cb83b8a00def4d4ffd7f61d6c6.dat new file mode 100644 index 000000000..b16d134a4 Binary files /dev/null and b/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_1562e2cb83b8a00def4d4ffd7f61d6c6.dat differ diff --git a/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_22bea33ac11caf48c359fbfb56b87ea3.dat b/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_22bea33ac11caf48c359fbfb56b87ea3.dat new file mode 100644 index 000000000..36e61a008 Binary files /dev/null and b/documentation/api/phpdoc-cache-c5/phpdoc-cache-file_22bea33ac11caf48c359fbfb56b87ea3.dat differ diff --git a/documentation/api/phpdoc-cache-c7/phpdoc-cache-file_4ccf50c89b039dec58506a0b43c7f9c9.dat b/documentation/api/phpdoc-cache-c7/phpdoc-cache-file_4ccf50c89b039dec58506a0b43c7f9c9.dat new file mode 100644 index 000000000..bf537109f Binary files /dev/null and b/documentation/api/phpdoc-cache-c7/phpdoc-cache-file_4ccf50c89b039dec58506a0b43c7f9c9.dat differ diff --git a/documentation/api/phpdoc-cache-c8/phpdoc-cache-file_b89973d207d28a2be5ce2508d6bf5b15.dat b/documentation/api/phpdoc-cache-c8/phpdoc-cache-file_b89973d207d28a2be5ce2508d6bf5b15.dat new file mode 100644 index 000000000..a221a3a7c Binary files /dev/null and b/documentation/api/phpdoc-cache-c8/phpdoc-cache-file_b89973d207d28a2be5ce2508d6bf5b15.dat differ diff --git a/documentation/api/phpdoc-cache-c9/phpdoc-cache-file_46ebcba4a7147d44ac1f4e3061e3c5e1.dat b/documentation/api/phpdoc-cache-c9/phpdoc-cache-file_46ebcba4a7147d44ac1f4e3061e3c5e1.dat new file mode 100644 index 000000000..14b0d7245 Binary files /dev/null and b/documentation/api/phpdoc-cache-c9/phpdoc-cache-file_46ebcba4a7147d44ac1f4e3061e3c5e1.dat differ diff --git a/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_1709fd0f6e8853b6d84657ebcf5dcbb8.dat b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_1709fd0f6e8853b6d84657ebcf5dcbb8.dat new file mode 100644 index 000000000..52163244c Binary files /dev/null and b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_1709fd0f6e8853b6d84657ebcf5dcbb8.dat differ diff --git a/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_48dbebd722468fbcf1f0b927ed4d6bff.dat b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_48dbebd722468fbcf1f0b927ed4d6bff.dat new file mode 100644 index 000000000..084b52b89 Binary files /dev/null and b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_48dbebd722468fbcf1f0b927ed4d6bff.dat differ diff --git a/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_bb1682d8d2da0edc266b3d559297e0fc.dat b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_bb1682d8d2da0edc266b3d559297e0fc.dat new file mode 100644 index 000000000..cd433e396 Binary files /dev/null and b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_bb1682d8d2da0edc266b3d559297e0fc.dat differ diff --git a/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_e1d16571b12c78f4b12a8e69ea479d96.dat b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_e1d16571b12c78f4b12a8e69ea479d96.dat new file mode 100644 index 000000000..442dc7d8a Binary files /dev/null and b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_e1d16571b12c78f4b12a8e69ea479d96.dat differ diff --git a/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_f8138de972069a39f08a312e0beaf719.dat b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_f8138de972069a39f08a312e0beaf719.dat new file mode 100644 index 000000000..1f4382379 Binary files /dev/null and b/documentation/api/phpdoc-cache-ca/phpdoc-cache-file_f8138de972069a39f08a312e0beaf719.dat differ diff --git a/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_62e3d60e31fe7c7fc909fa7144a6f2a2.dat b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_62e3d60e31fe7c7fc909fa7144a6f2a2.dat new file mode 100644 index 000000000..ab613cefe Binary files /dev/null and b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_62e3d60e31fe7c7fc909fa7144a6f2a2.dat differ diff --git a/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_698e59ee4573d87c6c5a26e0a1d7cd74.dat b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_698e59ee4573d87c6c5a26e0a1d7cd74.dat new file mode 100644 index 000000000..16ff24a61 Binary files /dev/null and b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_698e59ee4573d87c6c5a26e0a1d7cd74.dat differ diff --git a/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_990ffcf30f58c70b1e3b3255977e52e7.dat b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_990ffcf30f58c70b1e3b3255977e52e7.dat new file mode 100644 index 000000000..78e55dce1 Binary files /dev/null and b/documentation/api/phpdoc-cache-cb/phpdoc-cache-file_990ffcf30f58c70b1e3b3255977e52e7.dat differ diff --git a/documentation/api/phpdoc-cache-cc/phpdoc-cache-file_c538da994aa7dce85d4686964a16a902.dat b/documentation/api/phpdoc-cache-cc/phpdoc-cache-file_c538da994aa7dce85d4686964a16a902.dat new file mode 100644 index 000000000..a659d5b5a Binary files /dev/null and b/documentation/api/phpdoc-cache-cc/phpdoc-cache-file_c538da994aa7dce85d4686964a16a902.dat differ diff --git a/documentation/api/phpdoc-cache-cd/phpdoc-cache-file_11fd59c4cc9ee99b51fed2d61a3f109e.dat b/documentation/api/phpdoc-cache-cd/phpdoc-cache-file_11fd59c4cc9ee99b51fed2d61a3f109e.dat new file mode 100644 index 000000000..99705bd8b Binary files /dev/null and b/documentation/api/phpdoc-cache-cd/phpdoc-cache-file_11fd59c4cc9ee99b51fed2d61a3f109e.dat differ diff --git a/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_22bd4415fa86262c33062a84c4baa8ff.dat b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_22bd4415fa86262c33062a84c4baa8ff.dat new file mode 100644 index 000000000..3b78ca954 Binary files /dev/null and b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_22bd4415fa86262c33062a84c4baa8ff.dat differ diff --git a/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_2ec043ea6b7d2737ada4320dea142b84.dat b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_2ec043ea6b7d2737ada4320dea142b84.dat new file mode 100644 index 000000000..46d0e37a6 Binary files /dev/null and b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_2ec043ea6b7d2737ada4320dea142b84.dat differ diff --git a/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_73ea4b3f00544aed53c538dfd6410103.dat b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_73ea4b3f00544aed53c538dfd6410103.dat new file mode 100644 index 000000000..9ecaa2248 Binary files /dev/null and b/documentation/api/phpdoc-cache-ce/phpdoc-cache-file_73ea4b3f00544aed53c538dfd6410103.dat differ diff --git a/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_6c9d154d933a46a86983270063901083.dat b/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_6c9d154d933a46a86983270063901083.dat new file mode 100644 index 000000000..0f2c62276 Binary files /dev/null and b/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_6c9d154d933a46a86983270063901083.dat differ diff --git a/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_8ac13d330de74fc5c056ef4de3c97141.dat b/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_8ac13d330de74fc5c056ef4de3c97141.dat new file mode 100644 index 000000000..177439d71 Binary files /dev/null and b/documentation/api/phpdoc-cache-cf/phpdoc-cache-file_8ac13d330de74fc5c056ef4de3c97141.dat differ diff --git a/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_2df96822fc0de924d0a0fea30e546cd6.dat b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_2df96822fc0de924d0a0fea30e546cd6.dat new file mode 100644 index 000000000..3e680caf3 Binary files /dev/null and b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_2df96822fc0de924d0a0fea30e546cd6.dat differ diff --git a/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_427af671f188dda19b84814a8f0721a0.dat b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_427af671f188dda19b84814a8f0721a0.dat new file mode 100644 index 000000000..e9b5e7c32 Binary files /dev/null and b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_427af671f188dda19b84814a8f0721a0.dat differ diff --git a/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_94061fb56e042544776244ad29b64f0c.dat b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_94061fb56e042544776244ad29b64f0c.dat new file mode 100644 index 000000000..8c8f56899 Binary files /dev/null and b/documentation/api/phpdoc-cache-d0/phpdoc-cache-file_94061fb56e042544776244ad29b64f0c.dat differ diff --git a/documentation/api/phpdoc-cache-d1/phpdoc-cache-file_b3f5aaa0ea398848828c991b02b59eac.dat b/documentation/api/phpdoc-cache-d1/phpdoc-cache-file_b3f5aaa0ea398848828c991b02b59eac.dat new file mode 100644 index 000000000..233a78914 Binary files /dev/null and b/documentation/api/phpdoc-cache-d1/phpdoc-cache-file_b3f5aaa0ea398848828c991b02b59eac.dat differ diff --git a/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_a2c8a4cfd19fa59c514a20abd06d13b3.dat b/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_a2c8a4cfd19fa59c514a20abd06d13b3.dat new file mode 100644 index 000000000..b2ee5fc8e Binary files /dev/null and b/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_a2c8a4cfd19fa59c514a20abd06d13b3.dat differ diff --git a/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_bc38dfb945f3a73a4336472c144ddb83.dat b/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_bc38dfb945f3a73a4336472c144ddb83.dat new file mode 100644 index 000000000..6933b7c1f Binary files /dev/null and b/documentation/api/phpdoc-cache-d3/phpdoc-cache-file_bc38dfb945f3a73a4336472c144ddb83.dat differ diff --git a/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_0addfff3faff0a43c2e9d5616dc86169.dat b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_0addfff3faff0a43c2e9d5616dc86169.dat new file mode 100644 index 000000000..884d4336c Binary files /dev/null and b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_0addfff3faff0a43c2e9d5616dc86169.dat differ diff --git a/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_2b9b28ff99743f93387238a7146aa089.dat b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_2b9b28ff99743f93387238a7146aa089.dat new file mode 100644 index 000000000..0f123a0c1 Binary files /dev/null and b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_2b9b28ff99743f93387238a7146aa089.dat differ diff --git a/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_6745903d900d7d0151b4a147996a4e95.dat b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_6745903d900d7d0151b4a147996a4e95.dat new file mode 100644 index 000000000..5122d156a Binary files /dev/null and b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_6745903d900d7d0151b4a147996a4e95.dat differ diff --git a/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_832f916df1218cea222ce3553110770c.dat b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_832f916df1218cea222ce3553110770c.dat new file mode 100644 index 000000000..0471f8f38 Binary files /dev/null and b/documentation/api/phpdoc-cache-d4/phpdoc-cache-file_832f916df1218cea222ce3553110770c.dat differ diff --git a/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_54eb0132491a05638254d3bde82807c6.dat b/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_54eb0132491a05638254d3bde82807c6.dat new file mode 100644 index 000000000..04e4489a9 Binary files /dev/null and b/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_54eb0132491a05638254d3bde82807c6.dat differ diff --git a/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_f5e99f8159339b94daeeb0bed7246230.dat b/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_f5e99f8159339b94daeeb0bed7246230.dat new file mode 100644 index 000000000..72d63124a Binary files /dev/null and b/documentation/api/phpdoc-cache-d5/phpdoc-cache-file_f5e99f8159339b94daeeb0bed7246230.dat differ diff --git a/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_009dbb0397e4f95a3dba7106083f680f.dat b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_009dbb0397e4f95a3dba7106083f680f.dat new file mode 100644 index 000000000..32f3ec21c Binary files /dev/null and b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_009dbb0397e4f95a3dba7106083f680f.dat differ diff --git a/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_9d746bcb8d195ff5aa623b3d885ef6d2.dat b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_9d746bcb8d195ff5aa623b3d885ef6d2.dat new file mode 100644 index 000000000..55eaaf162 Binary files /dev/null and b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_9d746bcb8d195ff5aa623b3d885ef6d2.dat differ diff --git a/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_cd9baff7c7814dbf319b9c0f9e13c101.dat b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_cd9baff7c7814dbf319b9c0f9e13c101.dat new file mode 100644 index 000000000..437390e20 Binary files /dev/null and b/documentation/api/phpdoc-cache-d6/phpdoc-cache-file_cd9baff7c7814dbf319b9c0f9e13c101.dat differ diff --git a/documentation/api/phpdoc-cache-d7/phpdoc-cache-file_56d0ffe97fb77e02493ee715bb048d1d.dat b/documentation/api/phpdoc-cache-d7/phpdoc-cache-file_56d0ffe97fb77e02493ee715bb048d1d.dat new file mode 100644 index 000000000..9bd4f1dde Binary files /dev/null and b/documentation/api/phpdoc-cache-d7/phpdoc-cache-file_56d0ffe97fb77e02493ee715bb048d1d.dat differ diff --git a/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_2cdbb95f28d8d6a8becb0de919e60065.dat b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_2cdbb95f28d8d6a8becb0de919e60065.dat new file mode 100644 index 000000000..381512550 Binary files /dev/null and b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_2cdbb95f28d8d6a8becb0de919e60065.dat differ diff --git a/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_365ffcba120d2640c72127192ef1dad6.dat b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_365ffcba120d2640c72127192ef1dad6.dat new file mode 100644 index 000000000..a36ab2908 Binary files /dev/null and b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_365ffcba120d2640c72127192ef1dad6.dat differ diff --git a/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_59917d69f77ce2da28dfe87118899b11.dat b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_59917d69f77ce2da28dfe87118899b11.dat new file mode 100644 index 000000000..0152f4859 Binary files /dev/null and b/documentation/api/phpdoc-cache-d8/phpdoc-cache-file_59917d69f77ce2da28dfe87118899b11.dat differ diff --git a/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_eaaa93b0a4e986de38ed38b5d3179009.dat b/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_eaaa93b0a4e986de38ed38b5d3179009.dat new file mode 100644 index 000000000..30f2c305a Binary files /dev/null and b/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_eaaa93b0a4e986de38ed38b5d3179009.dat differ diff --git a/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_f613db5208c33f2a5e222363eb50e6a1.dat b/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_f613db5208c33f2a5e222363eb50e6a1.dat new file mode 100644 index 000000000..6f762979b Binary files /dev/null and b/documentation/api/phpdoc-cache-d9/phpdoc-cache-file_f613db5208c33f2a5e222363eb50e6a1.dat differ diff --git a/documentation/api/phpdoc-cache-db/phpdoc-cache-file_9b1df305e95461bb9100c401e4f9be99.dat b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_9b1df305e95461bb9100c401e4f9be99.dat new file mode 100644 index 000000000..3f6138785 Binary files /dev/null and b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_9b1df305e95461bb9100c401e4f9be99.dat differ diff --git a/documentation/api/phpdoc-cache-db/phpdoc-cache-file_b628ced4149fe9b93a10f411001cc90e.dat b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_b628ced4149fe9b93a10f411001cc90e.dat new file mode 100644 index 000000000..a3d2430cd Binary files /dev/null and b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_b628ced4149fe9b93a10f411001cc90e.dat differ diff --git a/documentation/api/phpdoc-cache-db/phpdoc-cache-file_e930b77477f54ba072f53fab18ccd272.dat b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_e930b77477f54ba072f53fab18ccd272.dat new file mode 100644 index 000000000..8ca8dff16 Binary files /dev/null and b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_e930b77477f54ba072f53fab18ccd272.dat differ diff --git a/documentation/api/phpdoc-cache-db/phpdoc-cache-file_f5daaed5aaec2d1443a65baf892ca9df.dat b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_f5daaed5aaec2d1443a65baf892ca9df.dat new file mode 100644 index 000000000..c22894044 Binary files /dev/null and b/documentation/api/phpdoc-cache-db/phpdoc-cache-file_f5daaed5aaec2d1443a65baf892ca9df.dat differ diff --git a/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_63d7a80b2399981e47c095262fe19365.dat b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_63d7a80b2399981e47c095262fe19365.dat new file mode 100644 index 000000000..130743bc7 Binary files /dev/null and b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_63d7a80b2399981e47c095262fe19365.dat differ diff --git a/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_94ab8abdd76e3678b516e4c661b84c26.dat b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_94ab8abdd76e3678b516e4c661b84c26.dat new file mode 100644 index 000000000..b12cd8c91 Binary files /dev/null and b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_94ab8abdd76e3678b516e4c661b84c26.dat differ diff --git a/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_b48b4c63a26b77a874b05572db3f2b5f.dat b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_b48b4c63a26b77a874b05572db3f2b5f.dat new file mode 100644 index 000000000..ea1b6cd15 Binary files /dev/null and b/documentation/api/phpdoc-cache-dc/phpdoc-cache-file_b48b4c63a26b77a874b05572db3f2b5f.dat differ diff --git a/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_04c3ec148f6fd08e3e04e991b3e8440e.dat b/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_04c3ec148f6fd08e3e04e991b3e8440e.dat new file mode 100644 index 000000000..95f12460a Binary files /dev/null and b/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_04c3ec148f6fd08e3e04e991b3e8440e.dat differ diff --git a/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_9960111939122a457f761dc2029ec421.dat b/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_9960111939122a457f761dc2029ec421.dat new file mode 100644 index 000000000..beb60878b Binary files /dev/null and b/documentation/api/phpdoc-cache-dd/phpdoc-cache-file_9960111939122a457f761dc2029ec421.dat differ diff --git a/documentation/api/phpdoc-cache-de/phpdoc-cache-file_8592c3b8d373a35c8d810b0b72b60478.dat b/documentation/api/phpdoc-cache-de/phpdoc-cache-file_8592c3b8d373a35c8d810b0b72b60478.dat new file mode 100644 index 000000000..66580724e Binary files /dev/null and b/documentation/api/phpdoc-cache-de/phpdoc-cache-file_8592c3b8d373a35c8d810b0b72b60478.dat differ diff --git a/documentation/api/phpdoc-cache-de/phpdoc-cache-file_eadd4dcbb158b762271458028f6454a0.dat b/documentation/api/phpdoc-cache-de/phpdoc-cache-file_eadd4dcbb158b762271458028f6454a0.dat new file mode 100644 index 000000000..a553d1e17 Binary files /dev/null and b/documentation/api/phpdoc-cache-de/phpdoc-cache-file_eadd4dcbb158b762271458028f6454a0.dat differ diff --git a/documentation/api/phpdoc-cache-df/phpdoc-cache-file_302052ee759b6b037f4b2f24744946d3.dat b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_302052ee759b6b037f4b2f24744946d3.dat new file mode 100644 index 000000000..34561ba95 Binary files /dev/null and b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_302052ee759b6b037f4b2f24744946d3.dat differ diff --git a/documentation/api/phpdoc-cache-df/phpdoc-cache-file_459a0f07acf371059c563381ea16dc7b.dat b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_459a0f07acf371059c563381ea16dc7b.dat new file mode 100644 index 000000000..f9a9c1647 Binary files /dev/null and b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_459a0f07acf371059c563381ea16dc7b.dat differ diff --git a/documentation/api/phpdoc-cache-df/phpdoc-cache-file_5b2db8e7d891b6f97ccf4ee706523fbb.dat b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_5b2db8e7d891b6f97ccf4ee706523fbb.dat new file mode 100644 index 000000000..063312db1 Binary files /dev/null and b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_5b2db8e7d891b6f97ccf4ee706523fbb.dat differ diff --git a/documentation/api/phpdoc-cache-df/phpdoc-cache-file_ec10159b7c0d9dfdfbd39744f802d3d3.dat b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_ec10159b7c0d9dfdfbd39744f802d3d3.dat new file mode 100644 index 000000000..7769f8bf3 Binary files /dev/null and b/documentation/api/phpdoc-cache-df/phpdoc-cache-file_ec10159b7c0d9dfdfbd39744f802d3d3.dat differ diff --git a/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_542750ae992888ca61a0b5a2d7d796c2.dat b/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_542750ae992888ca61a0b5a2d7d796c2.dat new file mode 100644 index 000000000..163554996 Binary files /dev/null and b/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_542750ae992888ca61a0b5a2d7d796c2.dat differ diff --git a/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_ea583296cd1103920fd36c75ccacd4f7.dat b/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_ea583296cd1103920fd36c75ccacd4f7.dat new file mode 100644 index 000000000..6ed0485b5 Binary files /dev/null and b/documentation/api/phpdoc-cache-e0/phpdoc-cache-file_ea583296cd1103920fd36c75ccacd4f7.dat differ diff --git a/documentation/api/phpdoc-cache-e1/phpdoc-cache-file_d0b8e182bef628cc1f8d40d4336b9473.dat b/documentation/api/phpdoc-cache-e1/phpdoc-cache-file_d0b8e182bef628cc1f8d40d4336b9473.dat new file mode 100644 index 000000000..bfa26204d Binary files /dev/null and b/documentation/api/phpdoc-cache-e1/phpdoc-cache-file_d0b8e182bef628cc1f8d40d4336b9473.dat differ diff --git a/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_1b6e2f666f5e8fcb2644cd54a35eb91b.dat b/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_1b6e2f666f5e8fcb2644cd54a35eb91b.dat new file mode 100644 index 000000000..a3bf35540 Binary files /dev/null and b/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_1b6e2f666f5e8fcb2644cd54a35eb91b.dat differ diff --git a/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_547d63e2659c552175a103ab0c675fb7.dat b/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_547d63e2659c552175a103ab0c675fb7.dat new file mode 100644 index 000000000..f3952bddd Binary files /dev/null and b/documentation/api/phpdoc-cache-e2/phpdoc-cache-file_547d63e2659c552175a103ab0c675fb7.dat differ diff --git a/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_0cb4d9ebd327ea769b3bc68c5e7ee3b7.dat b/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_0cb4d9ebd327ea769b3bc68c5e7ee3b7.dat new file mode 100644 index 000000000..f428cc264 Binary files /dev/null and b/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_0cb4d9ebd327ea769b3bc68c5e7ee3b7.dat differ diff --git a/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_5bc213d5d0954abe150c94876461c31a.dat b/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_5bc213d5d0954abe150c94876461c31a.dat new file mode 100644 index 000000000..e10619719 Binary files /dev/null and b/documentation/api/phpdoc-cache-e3/phpdoc-cache-file_5bc213d5d0954abe150c94876461c31a.dat differ diff --git a/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_08da3e63390ad4e6b015303fabd1bb82.dat b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_08da3e63390ad4e6b015303fabd1bb82.dat new file mode 100644 index 000000000..e891141d7 Binary files /dev/null and b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_08da3e63390ad4e6b015303fabd1bb82.dat differ diff --git a/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_61230618a29c5c2ff875ad97cc34c525.dat b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_61230618a29c5c2ff875ad97cc34c525.dat new file mode 100644 index 000000000..f7871e8ef Binary files /dev/null and b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_61230618a29c5c2ff875ad97cc34c525.dat differ diff --git a/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_617dbcf7bcce9576d3ed6511e572942b.dat b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_617dbcf7bcce9576d3ed6511e572942b.dat new file mode 100644 index 000000000..8cff3b6ed Binary files /dev/null and b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_617dbcf7bcce9576d3ed6511e572942b.dat differ diff --git a/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_9b9b2ded4fb387c0982828ceb3b33437.dat b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_9b9b2ded4fb387c0982828ceb3b33437.dat new file mode 100644 index 000000000..f3c34db19 Binary files /dev/null and b/documentation/api/phpdoc-cache-e4/phpdoc-cache-file_9b9b2ded4fb387c0982828ceb3b33437.dat differ diff --git a/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_7ed9144d0ca97e94e00a37ef736e5cf5.dat b/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_7ed9144d0ca97e94e00a37ef736e5cf5.dat new file mode 100644 index 000000000..c1b51270d Binary files /dev/null and b/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_7ed9144d0ca97e94e00a37ef736e5cf5.dat differ diff --git a/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_b04e06ce33632c32b2288de2e89029f1.dat b/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_b04e06ce33632c32b2288de2e89029f1.dat new file mode 100644 index 000000000..991244cae Binary files /dev/null and b/documentation/api/phpdoc-cache-e5/phpdoc-cache-file_b04e06ce33632c32b2288de2e89029f1.dat differ diff --git a/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_a95269da7430ac5bbfa2597696952757.dat b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_a95269da7430ac5bbfa2597696952757.dat new file mode 100644 index 000000000..01908cfb2 Binary files /dev/null and b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_a95269da7430ac5bbfa2597696952757.dat differ diff --git a/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_d43d6d81892f95cf323628c45b68d324.dat b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_d43d6d81892f95cf323628c45b68d324.dat new file mode 100644 index 000000000..93cb01e93 Binary files /dev/null and b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_d43d6d81892f95cf323628c45b68d324.dat differ diff --git a/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_dba4861a437c01bc1e36e303253b932b.dat b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_dba4861a437c01bc1e36e303253b932b.dat new file mode 100644 index 000000000..e5cba6c18 Binary files /dev/null and b/documentation/api/phpdoc-cache-e6/phpdoc-cache-file_dba4861a437c01bc1e36e303253b932b.dat differ diff --git a/documentation/api/phpdoc-cache-e7/phpdoc-cache-file_385a5161d0fe18d8303f9924248817ea.dat b/documentation/api/phpdoc-cache-e7/phpdoc-cache-file_385a5161d0fe18d8303f9924248817ea.dat new file mode 100644 index 000000000..32e7be90a Binary files /dev/null and b/documentation/api/phpdoc-cache-e7/phpdoc-cache-file_385a5161d0fe18d8303f9924248817ea.dat differ diff --git a/documentation/api/phpdoc-cache-e8/phpdoc-cache-file_9003ab5bbbe12958c9e6cac4267c3585.dat b/documentation/api/phpdoc-cache-e8/phpdoc-cache-file_9003ab5bbbe12958c9e6cac4267c3585.dat new file mode 100644 index 000000000..584b25760 Binary files /dev/null and b/documentation/api/phpdoc-cache-e8/phpdoc-cache-file_9003ab5bbbe12958c9e6cac4267c3585.dat differ diff --git a/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_07fe9e2277bb366a5dd75394dece7563.dat b/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_07fe9e2277bb366a5dd75394dece7563.dat new file mode 100644 index 000000000..aa26ef5c9 Binary files /dev/null and b/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_07fe9e2277bb366a5dd75394dece7563.dat differ diff --git a/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_0889999eee577d21230f2997ae85dc9b.dat b/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_0889999eee577d21230f2997ae85dc9b.dat new file mode 100644 index 000000000..f83ce714f Binary files /dev/null and b/documentation/api/phpdoc-cache-e9/phpdoc-cache-file_0889999eee577d21230f2997ae85dc9b.dat differ diff --git a/documentation/api/phpdoc-cache-ea/phpdoc-cache-file_0120a43e7a9c38a3f6cd505d30398702.dat b/documentation/api/phpdoc-cache-ea/phpdoc-cache-file_0120a43e7a9c38a3f6cd505d30398702.dat new file mode 100644 index 000000000..20ec446eb Binary files /dev/null and b/documentation/api/phpdoc-cache-ea/phpdoc-cache-file_0120a43e7a9c38a3f6cd505d30398702.dat differ diff --git a/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_0502e8e2f488cb703926075c7f9a6a42.dat b/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_0502e8e2f488cb703926075c7f9a6a42.dat new file mode 100644 index 000000000..9e3932562 Binary files /dev/null and b/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_0502e8e2f488cb703926075c7f9a6a42.dat differ diff --git a/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_90702e47d590de24549c49365ba1edbf.dat b/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_90702e47d590de24549c49365ba1edbf.dat new file mode 100644 index 000000000..3d58ea45a Binary files /dev/null and b/documentation/api/phpdoc-cache-ef/phpdoc-cache-file_90702e47d590de24549c49365ba1edbf.dat differ diff --git a/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_30acb5add40c1c672a1d1e2296e875ca.dat b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_30acb5add40c1c672a1d1e2296e875ca.dat new file mode 100644 index 000000000..a1f7dda72 Binary files /dev/null and b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_30acb5add40c1c672a1d1e2296e875ca.dat differ diff --git a/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_6d50d47c9c113a9b71ccc3c433e00eb0.dat b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_6d50d47c9c113a9b71ccc3c433e00eb0.dat new file mode 100644 index 000000000..73404b9ac Binary files /dev/null and b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_6d50d47c9c113a9b71ccc3c433e00eb0.dat differ diff --git a/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_de69c3ef2fdcdc295eb92bf69e4ceb02.dat b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_de69c3ef2fdcdc295eb92bf69e4ceb02.dat new file mode 100644 index 000000000..6214a9bf1 Binary files /dev/null and b/documentation/api/phpdoc-cache-f0/phpdoc-cache-file_de69c3ef2fdcdc295eb92bf69e4ceb02.dat differ diff --git a/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_68c039e0cb692f2ac1b3560caebe7b03.dat b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_68c039e0cb692f2ac1b3560caebe7b03.dat new file mode 100644 index 000000000..7bdab814e Binary files /dev/null and b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_68c039e0cb692f2ac1b3560caebe7b03.dat differ diff --git a/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_d303a79063004886305487d73d16c8a2.dat b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_d303a79063004886305487d73d16c8a2.dat new file mode 100644 index 000000000..30824394a Binary files /dev/null and b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_d303a79063004886305487d73d16c8a2.dat differ diff --git a/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_ff3d75f1a27e1e3bff30d32e9b5bc109.dat b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_ff3d75f1a27e1e3bff30d32e9b5bc109.dat new file mode 100644 index 000000000..67749769c Binary files /dev/null and b/documentation/api/phpdoc-cache-f1/phpdoc-cache-file_ff3d75f1a27e1e3bff30d32e9b5bc109.dat differ diff --git a/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_40ef5ea7acd877ae5c5348b804afc3c8.dat b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_40ef5ea7acd877ae5c5348b804afc3c8.dat new file mode 100644 index 000000000..78ada8540 Binary files /dev/null and b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_40ef5ea7acd877ae5c5348b804afc3c8.dat differ diff --git a/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_432929ee0ed12c53134993da8b8e8a53.dat b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_432929ee0ed12c53134993da8b8e8a53.dat new file mode 100644 index 000000000..f8ddee0d4 Binary files /dev/null and b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_432929ee0ed12c53134993da8b8e8a53.dat differ diff --git a/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_65f65b5f899af839767c445959b7f4f2.dat b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_65f65b5f899af839767c445959b7f4f2.dat new file mode 100644 index 000000000..c7e48d6f8 Binary files /dev/null and b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_65f65b5f899af839767c445959b7f4f2.dat differ diff --git a/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_a68ab2bc087a12db4d2c7dff85da99ea.dat b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_a68ab2bc087a12db4d2c7dff85da99ea.dat new file mode 100644 index 000000000..519cbeeee Binary files /dev/null and b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_a68ab2bc087a12db4d2c7dff85da99ea.dat differ diff --git a/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_b0b4f5cf1b9ac5a5472bb2b5d1836b3f.dat b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_b0b4f5cf1b9ac5a5472bb2b5d1836b3f.dat new file mode 100644 index 000000000..8d2ca5848 Binary files /dev/null and b/documentation/api/phpdoc-cache-f2/phpdoc-cache-file_b0b4f5cf1b9ac5a5472bb2b5d1836b3f.dat differ diff --git a/documentation/api/phpdoc-cache-f4/phpdoc-cache-file_b1c8a8e34280a9cd63b204ad068c3b20.dat b/documentation/api/phpdoc-cache-f4/phpdoc-cache-file_b1c8a8e34280a9cd63b204ad068c3b20.dat new file mode 100644 index 000000000..85e1a15ca Binary files /dev/null and b/documentation/api/phpdoc-cache-f4/phpdoc-cache-file_b1c8a8e34280a9cd63b204ad068c3b20.dat differ diff --git a/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_5553a2c5a89adb9f21e2ddf93f9cff3f.dat b/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_5553a2c5a89adb9f21e2ddf93f9cff3f.dat new file mode 100644 index 000000000..5a57e5cbc Binary files /dev/null and b/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_5553a2c5a89adb9f21e2ddf93f9cff3f.dat differ diff --git a/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_ba1250666ed521e056386c591751173a.dat b/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_ba1250666ed521e056386c591751173a.dat new file mode 100644 index 000000000..e23810e76 Binary files /dev/null and b/documentation/api/phpdoc-cache-f5/phpdoc-cache-file_ba1250666ed521e056386c591751173a.dat differ diff --git a/documentation/api/phpdoc-cache-f6/phpdoc-cache-file_5bca702b04f06b16fc9df050be755f8c.dat b/documentation/api/phpdoc-cache-f6/phpdoc-cache-file_5bca702b04f06b16fc9df050be755f8c.dat new file mode 100644 index 000000000..4f030562c Binary files /dev/null and b/documentation/api/phpdoc-cache-f6/phpdoc-cache-file_5bca702b04f06b16fc9df050be755f8c.dat differ diff --git a/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_5ae52bcb644b154d808b427cb392b282.dat b/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_5ae52bcb644b154d808b427cb392b282.dat new file mode 100644 index 000000000..07eb5a154 Binary files /dev/null and b/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_5ae52bcb644b154d808b427cb392b282.dat differ diff --git a/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_c6829587c6db5adb1f6148f7f07fc9ab.dat b/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_c6829587c6db5adb1f6148f7f07fc9ab.dat new file mode 100644 index 000000000..c7a29f968 Binary files /dev/null and b/documentation/api/phpdoc-cache-f8/phpdoc-cache-file_c6829587c6db5adb1f6148f7f07fc9ab.dat differ diff --git a/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_753ffbdf131bea3225ccb3235f41ea11.dat b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_753ffbdf131bea3225ccb3235f41ea11.dat new file mode 100644 index 000000000..cef618e88 Binary files /dev/null and b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_753ffbdf131bea3225ccb3235f41ea11.dat differ diff --git a/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_7757289834102457f619303a7c48459f.dat b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_7757289834102457f619303a7c48459f.dat new file mode 100644 index 000000000..9f2b8b018 Binary files /dev/null and b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_7757289834102457f619303a7c48459f.dat differ diff --git a/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_bfc67f09a602dd216203579575c3e0db.dat b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_bfc67f09a602dd216203579575c3e0db.dat new file mode 100644 index 000000000..38ef9f8e1 Binary files /dev/null and b/documentation/api/phpdoc-cache-fa/phpdoc-cache-file_bfc67f09a602dd216203579575c3e0db.dat differ diff --git a/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_248eb2fe0dba1cc9650f4271c6be5540.dat b/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_248eb2fe0dba1cc9650f4271c6be5540.dat new file mode 100644 index 000000000..b1e3b67f7 Binary files /dev/null and b/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_248eb2fe0dba1cc9650f4271c6be5540.dat differ diff --git a/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_787b7c7b8a3b1721ff277cee42c85d56.dat b/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_787b7c7b8a3b1721ff277cee42c85d56.dat new file mode 100644 index 000000000..b1acf3abe Binary files /dev/null and b/documentation/api/phpdoc-cache-fc/phpdoc-cache-file_787b7c7b8a3b1721ff277cee42c85d56.dat differ diff --git a/documentation/api/phpdoc-cache-fe/phpdoc-cache-file_bbaf78a183243ff3415ea47ac6711013.dat b/documentation/api/phpdoc-cache-fe/phpdoc-cache-file_bbaf78a183243ff3415ea47ac6711013.dat new file mode 100644 index 000000000..bf729fe83 Binary files /dev/null and b/documentation/api/phpdoc-cache-fe/phpdoc-cache-file_bbaf78a183243ff3415ea47ac6711013.dat differ diff --git a/install/faker.php b/install/faker.php index 86b401aee..60bc2bb81 100755 --- a/install/faker.php +++ b/install/faker.php @@ -5,7 +5,7 @@ use Thelia\Condition\Implementation\MatchForEveryoneManager; use Thelia\Condition\Implementation\MatchForTotalAmountManager; use Thelia\Condition\Implementation\MatchForXArticlesManager; use Thelia\Condition\Operators; -use Thelia\Coupon\AdapterInterface; +use Thelia\Coupon\FacadeInterface; use Thelia\Coupon\ConditionCollection; @@ -644,7 +644,7 @@ function generateCouponFixtures(\Thelia\Core\Thelia $thelia) { /** @var $container ContainerInterface Service Container */ $container = $thelia->getContainer(); - /** @var AdapterInterface $adapter */ + /** @var FacadeInterface $adapter */ $adapter = $container->get('thelia.adapter'); // Coupons diff --git a/install/insert.sql b/install/insert.sql index 80ab5a844..bf9022df4 100755 --- a/install/insert.sql +++ b/install/insert.sql @@ -8,7 +8,7 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('session_config.default', '1', 1, 1, NOW(), NOW()), ('verifyStock', '1', 0, 0, NOW(), NOW()), ('active-template', 'default', 0, 0, NOW(), NOW()), -('default_lang_without_translation', '1', 0, 0, NOW(), NOW()), +('default_lang_without_translation', '1', 1, 1, NOW(), NOW()), ('rewriting_enable', '0', 0, 0, NOW(), NOW()), ('imagine_graphic_driver', 'gd', 0, 0, NOW(), NOW()), ('default_images_quality_percent', '75', 0, 0, NOW(), NOW()), @@ -29,7 +29,8 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('thelia_customer_remember_me_cookie_expiration', 31536000, 0, 0, NOW(), NOW()), ('session_config.handlers', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler', 0, 0, NOW(), NOW()), ('company_name','', 0, 0, NOW(), NOW()), -('contact_email','', 0, 0, NOW(), NOW()) +('contact_email','', 0, 0, NOW(), NOW()), +('one_domain_foreach_lang','0', 1, 1, NOW(), NOW()) ; @@ -90,270 +91,271 @@ INSERT INTO `area` (`id`, `name`, `postage`, `created_at`, `updated_at`) VALUES INSERT INTO `area_delivery_module` (`id`, `area_id`, `delivery_module_id`, `created_at`, `updated_at`) VALUES (1, 1, 2, NOW(), NOW()); -INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `created_at`, `updated_at`) VALUES -(1, NULL, '4', 'AF', 'AFG', 0, NOW(), NOW()), -(2, NULL, '710', 'ZA', 'ZAF', 0, NOW(), NOW()), -(3, NULL, '8', 'AL', 'ALB', 0, NOW(), NOW()), -(4, NULL, '12', 'DZ', 'DZA', 0, NOW(), NOW()), -(5, NULL, '276', 'DE', 'DEU', 0, NOW(), NOW()), -(6, NULL, '20', 'AD', 'AND', 0, NOW(), NOW()), -(7, NULL, '24', 'AO', 'AGO', 0, NOW(), NOW()), -(8, NULL, '28', 'AG', 'ATG', 0, NOW(), NOW()), -(9, NULL, '682', 'SA', 'SAU', 0, NOW(), NOW()), -(10, NULL, '32', 'AR', 'ARG', 0, NOW(), NOW()), -(11, NULL, '51', 'AM', 'ARM', 0, NOW(), NOW()), -(12, NULL, '36', 'AU', 'AUS', 0, NOW(), NOW()), -(13, NULL, '40', 'AT', 'AUT', 0, NOW(), NOW()), -(14, NULL, '31', 'AZ', 'AZE', 0, NOW(), NOW()), -(15, NULL, '44', 'BS', 'BHS', 0, NOW(), NOW()), -(16, NULL, '48', 'BR', 'BHR', 0, NOW(), NOW()), -(17, NULL, '50', 'BD', 'BGD', 0, NOW(), NOW()), -(18, NULL, '52', 'BB', 'BRB', 0, NOW(), NOW()), -(19, NULL, '585', 'PW', 'PLW', 0, NOW(), NOW()), -(20, NULL, '56', 'BE', 'BEL', 0, NOW(), NOW()), -(21, NULL, '84', 'BL', 'BLZ', 0, NOW(), NOW()), -(22, NULL, '204', 'BJ', 'BEN', 0, NOW(), NOW()), -(23, NULL, '64', 'BT', 'BTN', 0, NOW(), NOW()), -(24, NULL, '112', 'BY', 'BLR', 0, NOW(), NOW()), -(25, NULL, '104', 'MM', 'MMR', 0, NOW(), NOW()), -(26, NULL, '68', 'BO', 'BOL', 0, NOW(), NOW()), -(27, NULL, '70', 'BA', 'BIH', 0, NOW(), NOW()), -(28, NULL, '72', 'BW', 'BWA', 0, NOW(), NOW()), -(29, NULL, '76', 'BR', 'BRA', 0, NOW(), NOW()), -(30, NULL, '96', 'BN', 'BRN', 0, NOW(), NOW()), -(31, NULL, '100', 'BG', 'BGR', 0, NOW(), NOW()), -(32, NULL, '854', 'BF', 'BFA', 0, NOW(), NOW()), -(33, NULL, '108', 'BI', 'BDI', 0, NOW(), NOW()), -(34, NULL, '116', 'KH', 'KHM', 0, NOW(), NOW()), -(35, NULL, '120', 'CM', 'CMR', 0, NOW(), NOW()), -(37, NULL, '132', 'CV', 'CPV', 0, NOW(), NOW()), -(38, NULL, '152', 'CL', 'CHL', 0, NOW(), NOW()), -(39, NULL, '156', 'CN', 'CHN', 0, NOW(), NOW()), -(40, NULL, '196', 'CY', 'CYP', 0, NOW(), NOW()), -(41, NULL, '170', 'CO', 'COL', 0, NOW(), NOW()), -(42, NULL, '174', 'KM', 'COM', 0, NOW(), NOW()), -(43, NULL, '178', 'CG', 'COG', 0, NOW(), NOW()), -(44, NULL, '184', 'CK', 'COK', 0, NOW(), NOW()), -(45, NULL, '408', 'KP', 'PRK', 0, NOW(), NOW()), -(46, NULL, '410', 'KR', 'KOR', 0, NOW(), NOW()), -(47, NULL, '188', 'CR', 'CRI', 0, NOW(), NOW()), -(48, NULL, '384', 'CI', 'CIV', 0, NOW(), NOW()), -(49, NULL, '191', 'HR', 'HRV', 0, NOW(), NOW()), -(50, NULL, '192', 'CU', 'CUB', 0, NOW(), NOW()), -(51, NULL, '208', 'DK', 'DNK', 0, NOW(), NOW()), -(52, NULL, '262', 'DJ', 'DJI', 0, NOW(), NOW()), -(53, NULL, '212', 'DM', 'DMA', 0, NOW(), NOW()), -(54, NULL, '818', 'EG', 'EGY', 0, NOW(), NOW()), -(55, NULL, '784', 'AE', 'ARE', 0, NOW(), NOW()), -(56, NULL, '218', 'EC', 'ECU', 0, NOW(), NOW()), -(57, NULL, '232', 'ER', 'ERI', 0, NOW(), NOW()), -(58, NULL, '724', 'ES', 'ESP', 0, NOW(), NOW()), -(59, NULL, '233', 'EE', 'EST', 0, NOW(), NOW()), -(61, NULL, '231', 'ET', 'ETH', 0, NOW(), NOW()), -(62, NULL, '242', 'FJ', 'FJI', 0, NOW(), NOW()), -(63, NULL, '246', 'FI', 'FIN', 0, NOW(), NOW()), -(64, 1, '250', 'FR', 'FRA', 1, NOW(), NOW()), -(65, NULL, '266', 'GA', 'GAB', 0, NOW(), NOW()), -(66, NULL, '270', 'GM', 'GMB', 0, NOW(), NOW()), -(67, NULL, '268', 'GE', 'GEO', 0, NOW(), NOW()), -(68, NULL, '288', 'GH', 'GHA', 0, NOW(), NOW()), -(69, NULL, '300', 'GR', 'GRC', 0, NOW(), NOW()), -(70, NULL, '308', 'GD', 'GRD', 0, NOW(), NOW()), -(71, NULL, '320', 'GT', 'GTM', 0, NOW(), NOW()), -(72, NULL, '324', 'GN', 'GIN', 0, NOW(), NOW()), -(73, NULL, '624', 'GW', 'GNB', 0, NOW(), NOW()), -(74, NULL, '226', 'GQ', 'GNQ', 0, NOW(), NOW()), -(75, NULL, '328', 'GY', 'GUY', 0, NOW(), NOW()), -(76, NULL, '332', 'HT', 'HTI', 0, NOW(), NOW()), -(77, NULL, '340', 'HN', 'HND', 0, NOW(), NOW()), -(78, NULL, '348', 'HU', 'HUN', 0, NOW(), NOW()), -(79, NULL, '356', 'IN', 'IND', 0, NOW(), NOW()), -(80, NULL, '360', 'ID', 'IDN', 0, NOW(), NOW()), -(81, NULL, '364', 'IR', 'IRN', 0, NOW(), NOW()), -(82, NULL, '368', 'IQ', 'IRQ', 0, NOW(), NOW()), -(83, NULL, '372', 'IE', 'IRL', 0, NOW(), NOW()), -(84, NULL, '352', 'IS', 'ISL', 0, NOW(), NOW()), -(85, NULL, '376', 'IL', 'ISR', 0, NOW(), NOW()), -(86, NULL, '380', 'IT', 'ITA', 0, NOW(), NOW()), -(87, NULL, '388', 'JM', 'JAM', 0, NOW(), NOW()), -(88, NULL, '392', 'JP', 'JPN', 0, NOW(), NOW()), -(89, NULL, '400', 'JO', 'JOR', 0, NOW(), NOW()), -(90, NULL, '398', 'KZ', 'KAZ', 0, NOW(), NOW()), -(91, NULL, '404', 'KE', 'KEN', 0, NOW(), NOW()), -(92, NULL, '417', 'KG', 'KGZ', 0, NOW(), NOW()), -(93, NULL, '296', 'KI', 'KIR', 0, NOW(), NOW()), -(94, NULL, '414', 'KW', 'KWT', 0, NOW(), NOW()), -(95, NULL, '418', 'LA', 'LAO', 0, NOW(), NOW()), -(96, NULL, '426', 'LS', 'LSO', 0, NOW(), NOW()), -(97, NULL, '428', 'LV', 'LVA', 0, NOW(), NOW()), -(98, NULL, '422', 'LB', 'LBN', 0, NOW(), NOW()), -(99, NULL, '430', 'LR', 'LBR', 0, NOW(), NOW()), -(100, NULL, '343', 'LY', 'LBY', 0, NOW(), NOW()), -(101, NULL, '438', 'LI', 'LIE', 0, NOW(), NOW()), -(102, NULL, '440', 'LT', 'LTU', 0, NOW(), NOW()), -(103, NULL, '442', 'LU', 'LUX', 0, NOW(), NOW()), -(104, NULL, '807', 'MK', 'MKD', 0, NOW(), NOW()), -(105, NULL, '450', 'MD', 'MDG', 0, NOW(), NOW()), -(106, NULL, '458', 'MY', 'MYS', 0, NOW(), NOW()), -(107, NULL, '454', 'MW', 'MWI', 0, NOW(), NOW()), -(108, NULL, '462', 'MV', 'MDV', 0, NOW(), NOW()), -(109, NULL, '466', 'ML', 'MLI', 0, NOW(), NOW()), -(110, NULL, '470', 'MT', 'MLT', 0, NOW(), NOW()), -(111, NULL, '504', 'MA', 'MAR', 0, NOW(), NOW()), -(112, NULL, '584', 'MH', 'MHL', 0, NOW(), NOW()), -(113, NULL, '480', 'MU', 'MUS', 0, NOW(), NOW()), -(114, NULL, '478', 'MR', 'MRT', 0, NOW(), NOW()), -(115, NULL, '484', 'MX', 'MEX', 0, NOW(), NOW()), -(116, NULL, '583', 'FM', 'FSM', 0, NOW(), NOW()), -(117, NULL, '498', 'MD', 'MDA', 0, NOW(), NOW()), -(118, NULL, '492', 'MC', 'MCO', 0, NOW(), NOW()), -(119, NULL, '496', 'MN', 'MNG', 0, NOW(), NOW()), -(120, NULL, '508', 'MZ', 'MOZ', 0, NOW(), NOW()), -(121, NULL, '516', 'NA', 'NAM', 0, NOW(), NOW()), -(122, NULL, '520', 'NR', 'NRU', 0, NOW(), NOW()), -(123, NULL, '524', 'NP', 'NPL', 0, NOW(), NOW()), -(124, NULL, '558', 'NI', 'NIC', 0, NOW(), NOW()), -(125, NULL, '562', 'NE', 'NER', 0, NOW(), NOW()), -(126, NULL, '566', 'NG', 'NGA', 0, NOW(), NOW()), -(127, NULL, '570', 'NU', 'NIU', 0, NOW(), NOW()), -(128, NULL, '578', 'NO', 'NOR', 0, NOW(), NOW()), -(129, NULL, '554', 'NZ', 'NZL', 0, NOW(), NOW()), -(130, NULL, '512', 'OM', 'OMN', 0, NOW(), NOW()), -(131, NULL, '800', 'UG', 'UGA', 0, NOW(), NOW()), -(132, NULL, '860', 'UZ', 'UZB', 0, NOW(), NOW()), -(133, NULL, '586', 'PK', 'PAK', 0, NOW(), NOW()), -(134, NULL, '591', 'PA', 'PAN', 0, NOW(), NOW()), -(135, NULL, '598', 'PG', 'PNG', 0, NOW(), NOW()), -(136, NULL, '600', 'PY', 'PRY', 0, NOW(), NOW()), -(137, NULL, '528', 'NL', 'NLD', 0, NOW(), NOW()), -(138, NULL, '604', 'PE', 'PER', 0, NOW(), NOW()), -(139, NULL, '608', 'PH', 'PHL', 0, NOW(), NOW()), -(140, NULL, '616', 'PL', 'POL', 0, NOW(), NOW()), -(141, NULL, '620', 'PT', 'PRT', 0, NOW(), NOW()), -(142, NULL, '634', 'QA', 'QAT', 0, NOW(), NOW()), -(143, NULL, '140', 'CF', 'CAF', 0, NOW(), NOW()), -(144, NULL, '214', 'DO', 'DOM', 0, NOW(), NOW()), -(145, NULL, '203', 'CZ', 'CZE', 0, NOW(), NOW()), -(146, NULL, '642', 'RO', 'ROU', 0, NOW(), NOW()), -(147, NULL, '826', 'GB', 'GBR', 0, NOW(), NOW()), -(148, NULL, '643', 'RU', 'RUS', 0, NOW(), NOW()), -(149, NULL, '646', 'RW', 'RWA', 0, NOW(), NOW()), -(150, NULL, '659', 'KN', 'KNA', 0, NOW(), NOW()), -(151, NULL, '662', 'LC', 'LCA', 0, NOW(), NOW()), -(152, NULL, '674', 'SM', 'SMR', 0, NOW(), NOW()), -(153, NULL, '670', 'VC', 'VCT', 0, NOW(), NOW()), -(154, NULL, '90', 'SB', 'SLB', 0, NOW(), NOW()), -(155, NULL, '222', 'SV', 'SLV', 0, NOW(), NOW()), -(156, NULL, '882', 'WS', 'WSM', 0, NOW(), NOW()), -(157, NULL, '678', 'ST', 'STP', 0, NOW(), NOW()), -(158, NULL, '686', 'SN', 'SEN', 0, NOW(), NOW()), -(159, NULL, '690', 'SC', 'SYC', 0, NOW(), NOW()), -(160, NULL, '694', 'SL', 'SLE', 0, NOW(), NOW()), -(161, NULL, '702', 'SG', 'SGP', 0, NOW(), NOW()), -(162, NULL, '703', 'SK', 'SVK', 0, NOW(), NOW()), -(163, NULL, '705', 'SI', 'SVN', 0, NOW(), NOW()), -(164, NULL, '706', 'SO', 'SOM', 0, NOW(), NOW()), -(165, NULL, '729', 'SD', 'SDN', 0, NOW(), NOW()), -(166, NULL, '144', 'LK', 'LKA', 0, NOW(), NOW()), -(167, NULL, '752', 'SE', 'SWE', 0, NOW(), NOW()), -(168, NULL, '756', 'CH', 'CHE', 0, NOW(), NOW()), -(169, NULL, '740', 'SR', 'SUR', 0, NOW(), NOW()), -(170, NULL, '748', 'SZ', 'SWZ', 0, NOW(), NOW()), -(171, NULL, '760', 'SY', 'SYR', 0, NOW(), NOW()), -(172, NULL, '762', 'TJ', 'TJK', 0, NOW(), NOW()), -(173, NULL, '834', 'TZ', 'TZA', 0, NOW(), NOW()), -(174, NULL, '148', 'TD', 'TCD', 0, NOW(), NOW()), -(175, NULL, '764', 'TH', 'THA', 0, NOW(), NOW()), -(176, NULL, '768', 'TG', 'TGO', 0, NOW(), NOW()), -(177, NULL, '776', 'TO', 'TON', 0, NOW(), NOW()), -(178, NULL, '780', 'TT', 'TTO', 0, NOW(), NOW()), -(179, NULL, '788', 'TN', 'TUN', 0, NOW(), NOW()), -(180, NULL, '795', 'TM', 'TKM', 0, NOW(), NOW()), -(181, NULL, '792', 'TR', 'TUR', 0, NOW(), NOW()), -(182, NULL, '798', 'TV', 'TUV', 0, NOW(), NOW()), -(183, NULL, '804', 'UA', 'UKR', 0, NOW(), NOW()), -(184, NULL, '858', 'UY', 'URY', 0, NOW(), NOW()), -(185, NULL, '336', 'VA', 'VAT', 0, NOW(), NOW()), -(186, NULL, '548', 'VU', 'VUT', 0, NOW(), NOW()), -(187, NULL, '862', 'VE', 'VEN', 0, NOW(), NOW()), -(188, NULL, '704', 'VN', 'VNM', 0, NOW(), NOW()), -(189, NULL, '887', 'YE', 'YEM', 0, NOW(), NOW()), -(191, NULL, '180', 'CD', 'COD', 0, NOW(), NOW()), -(192, NULL, '894', 'ZM', 'ZMB', 0, NOW(), NOW()), -(193, NULL, '716', 'ZW', 'ZWE', 0, NOW(), NOW()), -(196, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(197, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(198, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(199, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(200, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(201, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(202, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(203, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(204, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(205, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(206, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(207, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(208, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(209, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(210, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(211, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(212, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(213, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(214, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(215, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(216, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(217, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(218, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(219, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(220, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(221, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(222, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(223, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(224, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(225, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(226, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(227, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(228, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(229, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(230, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(231, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(232, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(233, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(234, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(235, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(236, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(237, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(238, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(239, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(240, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(241, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(242, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(243, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(244, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(245, NULL, '840', 'US', 'USA', 0, NOW(), NOW()), -(246, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(247, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(248, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(249, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(250, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(251, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(252, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(253, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(254, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(255, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(256, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(257, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(258, NULL, '124', 'CA', 'CAN', 0, NOW(), NOW()), -(259, NULL, '312', 'GP', 'GLP', 0, NOW(), NOW()), -(260, NULL, '254', 'GF', 'GUF', 0, NOW(), NOW()), -(261, NULL, '474', 'MQ', 'MTQ', 0, NOW(), NOW()), -(262, NULL, '175', 'YT', 'MYT', 0, NOW(), NOW()), -(263, NULL, '638', 'RE', 'REU', 0, NOW(), NOW()), -(264, NULL, '666', 'PM', 'SPM', 0, NOW(), NOW()), -(265, NULL, '540', 'NC', 'NCL', 0, NOW(), NOW()), -(266, NULL, '258', 'PF', 'PYF', 0, NOW(), NOW()), -(267, NULL, '876', 'WF', 'WLF', 0, NOW(), NOW()), -(268, NULL, '840', 'US', 'USA', 0, NOW(), NOW()); +INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `shop_country`, `created_at`, `updated_at`) VALUES +(1, NULL, '4', 'AF', 'AFG', 0, 0, NOW(), NOW()), +(2, NULL, '710', 'ZA', 'ZAF', 0, 0, NOW(), NOW()), +(3, NULL, '8', 'AL', 'ALB', 0, 0, NOW(), NOW()), +(4, NULL, '12', 'DZ', 'DZA', 0, 0, NOW(), NOW()), +(5, NULL, '276', 'DE', 'DEU', 0, 0, NOW(), NOW()), +(6, NULL, '20', 'AD', 'AND', 0, 0, NOW(), NOW()), +(7, NULL, '24', 'AO', 'AGO', 0, 0, NOW(), NOW()), +(8, NULL, '28', 'AG', 'ATG', 0, 0, NOW(), NOW()), +(9, NULL, '682', 'SA', 'SAU', 0, 0, NOW(), NOW()), +(10, NULL, '32', 'AR', 'ARG', 0, 0, NOW(), NOW()), +(11, NULL, '51', 'AM', 'ARM', 0, 0, NOW(), NOW()), +(12, NULL, '36', 'AU', 'AUS', 0, 0, NOW(), NOW()), +(13, NULL, '40', 'AT', 'AUT', 0, 0, NOW(), NOW()), +(14, NULL, '31', 'AZ', 'AZE', 0, 0, NOW(), NOW()), +(15, NULL, '44', 'BS', 'BHS', 0, 0, NOW(), NOW()), +(16, NULL, '48', 'BR', 'BHR', 0, 0, NOW(), NOW()), +(17, NULL, '50', 'BD', 'BGD', 0, 0, NOW(), NOW()), +(18, NULL, '52', 'BB', 'BRB', 0, 0, NOW(), NOW()), +(19, NULL, '585', 'PW', 'PLW', 0, 0, NOW(), NOW()), +(20, NULL, '56', 'BE', 'BEL', 0, 0, NOW(), NOW()), +(21, NULL, '84', 'BL', 'BLZ', 0, 0, NOW(), NOW()), +(22, NULL, '204', 'BJ', 'BEN', 0, 0, NOW(), NOW()), +(23, NULL, '64', 'BT', 'BTN', 0, 0, NOW(), NOW()), +(24, NULL, '112', 'BY', 'BLR', 0, 0, NOW(), NOW()), +(25, NULL, '104', 'MM', 'MMR', 0, 0, NOW(), NOW()), +(26, NULL, '68', 'BO', 'BOL', 0, 0, NOW(), NOW()), +(27, NULL, '70', 'BA', 'BIH', 0, 0, NOW(), NOW()), +(28, NULL, '72', 'BW', 'BWA', 0, 0, NOW(), NOW()), +(29, NULL, '76', 'BR', 'BRA', 0, 0, NOW(), NOW()), +(30, NULL, '96', 'BN', 'BRN', 0, 0, NOW(), NOW()), +(31, NULL, '100', 'BG', 'BGR', 0, 0, NOW(), NOW()), +(32, NULL, '854', 'BF', 'BFA', 0, 0, NOW(), NOW()), +(33, NULL, '108', 'BI', 'BDI', 0, 0, NOW(), NOW()), +(34, NULL, '116', 'KH', 'KHM', 0, 0, NOW(), NOW()), +(35, NULL, '120', 'CM', 'CMR', 0, 0, NOW(), NOW()), +(37, NULL, '132', 'CV', 'CPV', 0, 0, NOW(), NOW()), +(38, NULL, '152', 'CL', 'CHL', 0, 0, NOW(), NOW()), +(39, NULL, '156', 'CN', 'CHN', 0, 0, NOW(), NOW()), +(40, NULL, '196', 'CY', 'CYP', 0, 0, NOW(), NOW()), +(41, NULL, '170', 'CO', 'COL', 0, 0, NOW(), NOW()), +(42, NULL, '174', 'KM', 'COM', 0, 0, NOW(), NOW()), +(43, NULL, '178', 'CG', 'COG', 0, 0, NOW(), NOW()), +(44, NULL, '184', 'CK', 'COK', 0, 0, NOW(), NOW()), +(45, NULL, '408', 'KP', 'PRK', 0, 0, NOW(), NOW()), +(46, NULL, '410', 'KR', 'KOR', 0, 0, NOW(), NOW()), +(47, NULL, '188', 'CR', 'CRI', 0, 0, NOW(), NOW()), +(48, NULL, '384', 'CI', 'CIV', 0, 0, NOW(), NOW()), +(49, NULL, '191', 'HR', 'HRV', 0, 0, NOW(), NOW()), +(50, NULL, '192', 'CU', 'CUB', 0, 0, NOW(), NOW()), +(51, NULL, '208', 'DK', 'DNK', 0, 0, NOW(), NOW()), +(52, NULL, '262', 'DJ', 'DJI', 0, 0, NOW(), NOW()), +(53, NULL, '212', 'DM', 'DMA', 0, 0, NOW(), NOW()), +(54, NULL, '818', 'EG', 'EGY', 0, 0, NOW(), NOW()), +(55, NULL, '784', 'AE', 'ARE', 0, 0, NOW(), NOW()), +(56, NULL, '218', 'EC', 'ECU', 0, 0, NOW(), NOW()), +(57, NULL, '232', 'ER', 'ERI', 0, 0, NOW(), NOW()), +(58, NULL, '724', 'ES', 'ESP', 0, 0, NOW(), NOW()), +(59, NULL, '233', 'EE', 'EST', 0, 0, NOW(), NOW()), +(61, NULL, '231', 'ET', 'ETH', 0, 0, NOW(), NOW()), +(62, NULL, '242', 'FJ', 'FJI', 0, 0, NOW(), NOW()), +(63, NULL, '246', 'FI', 'FIN', 0, 0, NOW(), NOW()), +(64, 1, '250', 'FR', 'FRA', 1, 1, NOW(), NOW()), +(65, NULL, '266', 'GA', 'GAB', 0, 0, NOW(), NOW()), +(66, NULL, '270', 'GM', 'GMB', 0, 0, NOW(), NOW()), +(67, NULL, '268', 'GE', 'GEO', 0, 0, NOW(), NOW()), +(68, NULL, '288', 'GH', 'GHA', 0, 0, NOW(), NOW()), +(69, NULL, '300', 'GR', 'GRC', 0, 0, NOW(), NOW()), +(70, NULL, '308', 'GD', 'GRD', 0, 0, NOW(), NOW()), +(71, NULL, '320', 'GT', 'GTM', 0, 0, NOW(), NOW()), +(72, NULL, '324', 'GN', 'GIN', 0, 0, NOW(), NOW()), +(73, NULL, '624', 'GW', 'GNB', 0, 0, NOW(), NOW()), +(74, NULL, '226', 'GQ', 'GNQ', 0, 0, NOW(), NOW()), +(75, NULL, '328', 'GY', 'GUY', 0, 0, NOW(), NOW()), +(76, NULL, '332', 'HT', 'HTI', 0, 0, NOW(), NOW()), +(77, NULL, '340', 'HN', 'HND', 0, 0, NOW(), NOW()), +(78, NULL, '348', 'HU', 'HUN', 0, 0, NOW(), NOW()), +(79, NULL, '356', 'IN', 'IND', 0, 0, NOW(), NOW()), +(80, NULL, '360', 'ID', 'IDN', 0, 0, NOW(), NOW()), +(81, NULL, '364', 'IR', 'IRN', 0, 0, NOW(), NOW()), +(82, NULL, '368', 'IQ', 'IRQ', 0, 0, NOW(), NOW()), +(83, NULL, '372', 'IE', 'IRL', 0, 0, NOW(), NOW()), +(84, NULL, '352', 'IS', 'ISL', 0, 0, NOW(), NOW()), +(85, NULL, '376', 'IL', 'ISR', 0, 0, NOW(), NOW()), +(86, NULL, '380', 'IT', 'ITA', 0, 0, NOW(), NOW()), +(87, NULL, '388', 'JM', 'JAM', 0, 0, NOW(), NOW()), +(88, NULL, '392', 'JP', 'JPN', 0, 0, NOW(), NOW()), +(89, NULL, '400', 'JO', 'JOR', 0, 0, NOW(), NOW()), +(90, NULL, '398', 'KZ', 'KAZ', 0, 0, NOW(), NOW()), +(91, NULL, '404', 'KE', 'KEN', 0, 0, NOW(), NOW()), +(92, NULL, '417', 'KG', 'KGZ', 0, 0, NOW(), NOW()), +(93, NULL, '296', 'KI', 'KIR', 0, 0, NOW(), NOW()), +(94, NULL, '414', 'KW', 'KWT', 0, 0, NOW(), NOW()), +(95, NULL, '418', 'LA', 'LAO', 0, 0, NOW(), NOW()), +(96, NULL, '426', 'LS', 'LSO', 0, 0, NOW(), NOW()), +(97, NULL, '428', 'LV', 'LVA', 0, 0, NOW(), NOW()), +(98, NULL, '422', 'LB', 'LBN', 0, 0, NOW(), NOW()), +(99, NULL, '430', 'LR', 'LBR', 0, 0, NOW(), NOW()), +(100, NULL, '343', 'LY', 'LBY', 0, 0, NOW(), NOW()), +(101, NULL, '438', 'LI', 'LIE', 0, 0, NOW(), NOW()), +(102, NULL, '440', 'LT', 'LTU', 0, 0, NOW(), NOW()), +(103, NULL, '442', 'LU', 'LUX', 0, 0, NOW(), NOW()), +(104, NULL, '807', 'MK', 'MKD', 0, 0, NOW(), NOW()), +(105, NULL, '450', 'MD', 'MDG', 0, 0, NOW(), NOW()), +(106, NULL, '458', 'MY', 'MYS', 0, 0, NOW(), NOW()), +(107, NULL, '454', 'MW', 'MWI', 0, 0, NOW(), NOW()), +(108, NULL, '462', 'MV', 'MDV', 0, 0, NOW(), NOW()), +(109, NULL, '466', 'ML', 'MLI', 0, 0, NOW(), NOW()), +(110, NULL, '470', 'MT', 'MLT', 0, 0, NOW(), NOW()), +(111, NULL, '504', 'MA', 'MAR', 0, 0, NOW(), NOW()), +(112, NULL, '584', 'MH', 'MHL', 0, 0, NOW(), NOW()), +(113, NULL, '480', 'MU', 'MUS', 0, 0, NOW(), NOW()), +(114, NULL, '478', 'MR', 'MRT', 0, 0, NOW(), NOW()), +(115, NULL, '484', 'MX', 'MEX', 0, 0, NOW(), NOW()), +(116, NULL, '583', 'FM', 'FSM', 0, 0, NOW(), NOW()), +(117, NULL, '498', 'MD', 'MDA', 0, 0, NOW(), NOW()), +(118, NULL, '492', 'MC', 'MCO', 0, 0, NOW(), NOW()), +(119, NULL, '496', 'MN', 'MNG', 0, 0, NOW(), NOW()), +(120, NULL, '508', 'MZ', 'MOZ', 0, 0, NOW(), NOW()), +(121, NULL, '516', 'NA', 'NAM', 0, 0, NOW(), NOW()), +(122, NULL, '520', 'NR', 'NRU', 0, 0, NOW(), NOW()), +(123, NULL, '524', 'NP', 'NPL', 0, 0, NOW(), NOW()), +(124, NULL, '558', 'NI', 'NIC', 0, 0, NOW(), NOW()), +(125, NULL, '562', 'NE', 'NER', 0, 0, NOW(), NOW()), +(126, NULL, '566', 'NG', 'NGA', 0, 0, NOW(), NOW()), +(127, NULL, '570', 'NU', 'NIU', 0, 0, NOW(), NOW()), +(128, NULL, '578', 'NO', 'NOR', 0, 0, NOW(), NOW()), +(129, NULL, '554', 'NZ', 'NZL', 0, 0, NOW(), NOW()), +(130, NULL, '512', 'OM', 'OMN', 0, 0, NOW(), NOW()), +(131, NULL, '800', 'UG', 'UGA', 0, 0, NOW(), NOW()), +(132, NULL, '860', 'UZ', 'UZB', 0, 0, NOW(), NOW()), +(133, NULL, '586', 'PK', 'PAK', 0, 0, NOW(), NOW()), +(134, NULL, '591', 'PA', 'PAN', 0, 0, NOW(), NOW()), +(135, NULL, '598', 'PG', 'PNG', 0, 0, NOW(), NOW()), +(136, NULL, '600', 'PY', 'PRY', 0, 0, NOW(), NOW()), +(137, NULL, '528', 'NL', 'NLD', 0, 0, NOW(), NOW()), +(138, NULL, '604', 'PE', 'PER', 0, 0, NOW(), NOW()), +(139, NULL, '608', 'PH', 'PHL', 0, 0, NOW(), NOW()), +(140, NULL, '616', 'PL', 'POL', 0, 0, NOW(), NOW()), +(141, NULL, '620', 'PT', 'PRT', 0, 0, NOW(), NOW()), +(142, NULL, '634', 'QA', 'QAT', 0, 0, NOW(), NOW()), +(143, NULL, '140', 'CF', 'CAF', 0, 0, NOW(), NOW()), +(144, NULL, '214', 'DO', 'DOM', 0, 0, NOW(), NOW()), +(145, NULL, '203', 'CZ', 'CZE', 0, 0, NOW(), NOW()), +(146, NULL, '642', 'RO', 'ROU', 0, 0, NOW(), NOW()), +(147, NULL, '826', 'GB', 'GBR', 0, 0, NOW(), NOW()), +(148, NULL, '643', 'RU', 'RUS', 0, 0, NOW(), NOW()), +(149, NULL, '646', 'RW', 'RWA', 0, 0, NOW(), NOW()), +(150, NULL, '659', 'KN', 'KNA', 0, 0, NOW(), NOW()), +(151, NULL, '662', 'LC', 'LCA', 0, 0, NOW(), NOW()), +(152, NULL, '674', 'SM', 'SMR', 0, 0, NOW(), NOW()), +(153, NULL, '670', 'VC', 'VCT', 0, 0, NOW(), NOW()), +(154, NULL, '90', 'SB', 'SLB', 0, 0, NOW(), NOW()), +(155, NULL, '222', 'SV', 'SLV', 0, 0, NOW(), NOW()), +(156, NULL, '882', 'WS', 'WSM', 0, 0, NOW(), NOW()), +(157, NULL, '678', 'ST', 'STP', 0, 0, NOW(), NOW()), +(158, NULL, '686', 'SN', 'SEN', 0, 0, NOW(), NOW()), +(159, NULL, '690', 'SC', 'SYC', 0, 0, NOW(), NOW()), +(160, NULL, '694', 'SL', 'SLE', 0, 0, NOW(), NOW()), +(161, NULL, '702', 'SG', 'SGP', 0, 0, NOW(), NOW()), +(162, NULL, '703', 'SK', 'SVK', 0, 0, NOW(), NOW()), +(163, NULL, '705', 'SI', 'SVN', 0, 0, NOW(), NOW()), +(164, NULL, '706', 'SO', 'SOM', 0, 0, NOW(), NOW()), +(165, NULL, '729', 'SD', 'SDN', 0, 0, NOW(), NOW()), +(166, NULL, '144', 'LK', 'LKA', 0, 0, NOW(), NOW()), +(167, NULL, '752', 'SE', 'SWE', 0, 0, NOW(), NOW()), +(168, NULL, '756', 'CH', 'CHE', 0, 0, NOW(), NOW()), +(169, NULL, '740', 'SR', 'SUR', 0, 0, NOW(), NOW()), +(170, NULL, '748', 'SZ', 'SWZ', 0, 0, NOW(), NOW()), +(171, NULL, '760', 'SY', 'SYR', 0, 0, NOW(), NOW()), +(172, NULL, '762', 'TJ', 'TJK', 0, 0, NOW(), NOW()), +(173, NULL, '834', 'TZ', 'TZA', 0, 0, NOW(), NOW()), +(174, NULL, '148', 'TD', 'TCD', 0, 0, NOW(), NOW()), +(175, NULL, '764', 'TH', 'THA', 0, 0, NOW(), NOW()), +(176, NULL, '768', 'TG', 'TGO', 0, 0, NOW(), NOW()), +(177, NULL, '776', 'TO', 'TON', 0, 0, NOW(), NOW()), +(178, NULL, '780', 'TT', 'TTO', 0, 0, NOW(), NOW()), +(179, NULL, '788', 'TN', 'TUN', 0, 0, NOW(), NOW()), +(180, NULL, '795', 'TM', 'TKM', 0, 0, NOW(), NOW()), +(181, NULL, '792', 'TR', 'TUR', 0, 0, NOW(), NOW()), +(182, NULL, '798', 'TV', 'TUV', 0, 0, NOW(), NOW()), +(183, NULL, '804', 'UA', 'UKR', 0, 0, NOW(), NOW()), +(184, NULL, '858', 'UY', 'URY', 0, 0, NOW(), NOW()), +(185, NULL, '336', 'VA', 'VAT', 0, 0, NOW(), NOW()), +(186, NULL, '548', 'VU', 'VUT', 0, 0, NOW(), NOW()), +(187, NULL, '862', 'VE', 'VEN', 0, 0, NOW(), NOW()), +(188, NULL, '704', 'VN', 'VNM', 0, 0, NOW(), NOW()), +(189, NULL, '887', 'YE', 'YEM', 0, 0, NOW(), NOW()), +(190, NULL, '807', 'MK', 'MKD', 0, 0, NOW(), NOW()), +(191, NULL, '180', 'CD', 'COD', 0, 0, NOW(), NOW()), +(192, NULL, '894', 'ZM', 'ZMB', 0, 0, NOW(), NOW()), +(193, NULL, '716', 'ZW', 'ZWE', 0, 0, NOW(), NOW()), +(196, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(197, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(198, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(199, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(200, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(201, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(202, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(203, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(204, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(205, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(206, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(207, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(208, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(209, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(210, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(211, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(212, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(213, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(214, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(215, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(216, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(217, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(218, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(219, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(220, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(221, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(222, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(223, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(224, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(225, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(226, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(227, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(228, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(229, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(230, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(231, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(232, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(233, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(234, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(235, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(236, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(237, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(238, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(239, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(240, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(241, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(242, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(243, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(244, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(245, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()), +(246, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(247, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(248, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(249, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(250, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(251, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(252, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(253, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(254, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(255, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(256, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(257, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(258, NULL, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()), +(259, NULL, '312', 'GP', 'GLP', 0, 0, NOW(), NOW()), +(260, NULL, '254', 'GF', 'GUF', 0, 0, NOW(), NOW()), +(261, NULL, '474', 'MQ', 'MTQ', 0, 0, NOW(), NOW()), +(262, NULL, '175', 'YT', 'MYT', 0, 0, NOW(), NOW()), +(263, NULL, '638', 'RE', 'REU', 0, 0, NOW(), NOW()), +(264, NULL, '666', 'PM', 'SPM', 0, 0, NOW(), NOW()), +(265, NULL, '540', 'NC', 'NCL', 0, 0, NOW(), NOW()), +(266, NULL, '258', 'PF', 'PYF', 0, 0, NOW(), NOW()), +(267, NULL, '876', 'WF', 'WLF', 0, 0, NOW(), NOW()), +(268, NULL, '840', 'US', 'USA', 0, 0, NOW(), NOW()); INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES (1, 'en_US', 'Afghanistan', '', '', ''), @@ -1193,31 +1195,81 @@ INSERT INTO `order_status_i18n` (`id`, `locale`, `title`, `description`, `chapo` (5, 'en_US', 'Canceled', '', '', ''), (5, 'fr_FR', 'Annulée', '', '', ''); - /** generated with command : php Thelia thelia:generate-resources --output sql */ INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES -(NULL, 'admin.address', NOW(), NOW()), -(NULL, 'admin.configuration.admin', NOW(), NOW()), -(NULL, 'admin.configuration.area', NOW(), NOW()), -(NULL, 'admin.configuration.attribute', NOW(), NOW()), -(NULL, 'admin.category', NOW(), NOW()), -(NULL, 'admin.configuration', NOW(), NOW()), -(NULL, 'admin.content', NOW(), NOW()), -(NULL, 'admin.configuration.country', NOW(), NOW()), -(NULL, 'admin.coupon', NOW(), NOW()), -(NULL, 'admin.configuration.currency', NOW(), NOW()), -(NULL, 'admin.customer', NOW(), NOW()), -(NULL, 'admin.configuration.feature', NOW(), NOW()), -(NULL, 'admin.folder', NOW(), NOW()), -(NULL, 'admin.configuration.language', NOW(), NOW()), -(NULL, 'admin.configuration.mailing-system', NOW(), NOW()), -(NULL, 'admin.configuration.message', NOW(), NOW()), -(NULL, 'admin.configuration.module', NOW(), NOW()), -(NULL, 'admin.order', NOW(), NOW()), -(NULL, 'admin.product', NOW(), NOW()), -(NULL, 'admin.configuration.profile', NOW(), NOW()), -(NULL, 'admin.configuration.shipping-zone', NOW(), NOW()), -(NULL, 'admin.configuration.tax', NOW(), NOW()), -(NULL, 'admin.configuration.template', NOW(), NOW()) +(1, 'admin.address', NOW(), NOW()), +(2, 'admin.configuration.admin', NOW(), NOW()), +(3, 'admin.configuration.area', NOW(), NOW()), +(4, 'admin.configuration.attribute', NOW(), NOW()), +(5, 'admin.category', NOW(), NOW()), +(6, 'admin.configuration', NOW(), NOW()), +(7, 'admin.content', NOW(), NOW()), +(8, 'admin.configuration.country', NOW(), NOW()), +(9, 'admin.coupon', NOW(), NOW()), +(10, 'admin.configuration.currency', NOW(), NOW()), +(11, 'admin.customer', NOW(), NOW()), +(12, 'admin.configuration.feature', NOW(), NOW()), +(13, 'admin.folder', NOW(), NOW()), +(14, 'admin.configuration.language', NOW(), NOW()), +(15, 'admin.configuration.mailing-system', NOW(), NOW()), +(16, 'admin.configuration.message', NOW(), NOW()), +(17, 'admin.configuration.module', NOW(), NOW()), +(18, 'admin.order', NOW(), NOW()), +(19, 'admin.product', NOW(), NOW()), +(20, 'admin.configuration.profile', NOW(), NOW()), +(21, 'admin.configuration.shipping-zone', NOW(), NOW()), +(22, 'admin.configuration.tax', NOW(), NOW()), +(23, 'admin.configuration.template', NOW(), NOW()); + +/** +generated with command : php Thelia thelia:generate-resources --output sql-i18n + */ +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES +(1, 'en_US', 'Address'), +(1, 'fr_FR', 'Address'), +(2, 'en_US', 'Configuration / Admin'), +(2, 'fr_FR', 'Configuration / Admin'), +(3, 'en_US', 'Configuration / Area'), +(3, 'fr_FR', 'Configuration / Area'), +(4, 'en_US', 'Configuration / Attribute'), +(4, 'fr_FR', 'Configuration / Attribute'), +(5, 'en_US', 'Category'), +(5, 'fr_FR', 'Category'), +(6, 'en_US', 'Configuration'), +(6, 'fr_FR', 'Configuration'), +(7, 'en_US', 'Content'), +(7, 'fr_FR', 'Content'), +(8, 'en_US', 'Configuration / Country'), +(8, 'fr_FR', 'Configuration / Country'), +(9, 'en_US', 'Coupon'), +(9, 'fr_FR', 'Coupon'), +(10, 'en_US', 'Configuration / Currency'), +(10, 'fr_FR', 'Configuration / Currency'), +(11, 'en_US', 'Customer'), +(11, 'fr_FR', 'Customer'), +(12, 'en_US', 'Configuration / Feature'), +(12, 'fr_FR', 'Configuration / Feature'), +(13, 'en_US', 'Folder'), +(13, 'fr_FR', 'Folder'), +(14, 'en_US', 'Configuration / Language'), +(14, 'fr_FR', 'Configuration / Language'), +(15, 'en_US', 'Configuration / Mailing-system'), +(15, 'fr_FR', 'Configuration / Mailing-system'), +(16, 'en_US', 'Configuration / Message'), +(16, 'fr_FR', 'Configuration / Message'), +(17, 'en_US', 'Configuration / Module'), +(17, 'fr_FR', 'Configuration / Module'), +(18, 'en_US', 'Order'), +(18, 'fr_FR', 'Order'), +(19, 'en_US', 'Product'), +(19, 'fr_FR', 'Product'), +(20, 'en_US', 'Configuration / Profile'), +(20, 'fr_FR', 'Configuration / Profile'), +(21, 'en_US', 'Configuration / Shipping-zone'), +(21, 'fr_FR', 'Configuration / Shipping-zone'), +(22, 'en_US', 'Configuration / Tax'), +(22, 'fr_FR', 'Configuration / Tax'), +(23, 'en_US', 'Configuration / Template'), +(23, 'fr_FR', 'Configuration / Template'); diff --git a/install/thelia.sql b/install/thelia.sql index b99e335f8..32f6e5e6f 100755 --- a/install/thelia.sql +++ b/install/thelia.sql @@ -98,7 +98,8 @@ CREATE TABLE `country` `isocode` VARCHAR(4) NOT NULL, `isoalpha2` VARCHAR(2), `isoalpha3` VARCHAR(4), - `by_default` TINYINT, + `by_default` TINYINT DEFAULT 0, + `shop_country` TINYINT(1) DEFAULT 0 NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), @@ -983,7 +984,7 @@ CREATE TABLE `admin` `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), - INDEX `fk_admin_profile_id` (`profile_id`), + INDEX `idx_admin_profile_id` (`profile_id`), CONSTRAINT `fk_admin_profile_id` FOREIGN KEY (`profile_id`) REFERENCES `profile` (`id`) @@ -999,14 +1000,13 @@ DROP TABLE IF EXISTS `profile_resource`; CREATE TABLE `profile_resource` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, `profile_id` INTEGER NOT NULL, `resource_id` INTEGER NOT NULL, `access` INTEGER DEFAULT 0 NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, - PRIMARY KEY (`id`,`profile_id`,`resource_id`), - INDEX `id_profile_resource_profile_id` (`profile_id`), + PRIMARY KEY (`profile_id`,`resource_id`), + INDEX `idx_profile_resource_profile_id` (`profile_id`), INDEX `idx_profile_resource_resource_id` (`resource_id`), CONSTRAINT `fk_profile_resource_profile_id` FOREIGN KEY (`profile_id`) @@ -1028,13 +1028,12 @@ DROP TABLE IF EXISTS `profile_module`; CREATE TABLE `profile_module` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, `profile_id` INTEGER NOT NULL, - `module_id` INTEGER, + `module_id` INTEGER NOT NULL, `access` TINYINT DEFAULT 0, `created_at` DATETIME, `updated_at` DATETIME, - PRIMARY KEY (`id`), + PRIMARY KEY (`profile_id`,`module_id`), INDEX `idx_profile_module_profile_id` (`profile_id`), INDEX `idx_profile_module_module_id` (`module_id`), CONSTRAINT `fk_profile_module_profile_id` @@ -1200,16 +1199,24 @@ CREATE TABLE `cart` INDEX `idx_cart_currency_id` (`currency_id`), CONSTRAINT `fk_cart_customer_id` FOREIGN KEY (`customer_id`) - REFERENCES `customer` (`id`), + REFERENCES `customer` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, CONSTRAINT `fk_cart_address_delivery_id` FOREIGN KEY (`address_delivery_id`) - REFERENCES `address` (`id`), + REFERENCES `address` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, CONSTRAINT `fk_cart_address_invoice_id` FOREIGN KEY (`address_invoice_id`) - REFERENCES `address` (`id`), + REFERENCES `address` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, CONSTRAINT `fk_cart_currency_id` FOREIGN KEY (`currency_id`) REFERENCES `currency` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE ) ENGINE=InnoDB; -- --------------------------------------------------------------------- @@ -1238,13 +1245,19 @@ CREATE TABLE `cart_item` INDEX `idx_cart_item_product_sale_elements_id` (`product_sale_elements_id`), CONSTRAINT `fk_cart_item_cart_id` FOREIGN KEY (`cart_id`) - REFERENCES `cart` (`id`), + REFERENCES `cart` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, CONSTRAINT `fk_cart_item_product_id` FOREIGN KEY (`product_id`) - REFERENCES `product` (`id`), + REFERENCES `product` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, CONSTRAINT `fk_cart_item_product_sale_elements_id` FOREIGN KEY (`product_sale_elements_id`) REFERENCES `product_sale_elements` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE ) ENGINE=InnoDB; -- --------------------------------------------------------------------- @@ -1259,6 +1272,7 @@ CREATE TABLE `product_price` `currency_id` INTEGER NOT NULL, `price` FLOAT NOT NULL, `promo_price` FLOAT, + `from_default_currency` TINYINT(1) DEFAULT 0 NOT NULL, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`product_sale_elements_id`,`currency_id`), @@ -1593,9 +1607,6 @@ CREATE TABLE `newsletter` `email` VARCHAR(255) NOT NULL, `firstname` VARCHAR(255), `lastname` VARCHAR(255), - `locale` VARCHAR(45), - `created_at` DATETIME, - `updated_at` DATETIME, PRIMARY KEY (`id`) ) ENGINE=InnoDB; diff --git a/local/config/schema.xml b/local/config/schema.xml index 81c10cbd3..5f81a7ba0 100755 --- a/local/config/schema.xml +++ b/local/config/schema.xml @@ -994,9 +994,9 @@ - - - + + + @@ -1250,10 +1250,5 @@ - - - - -
diff --git a/templates/admin/default/admin-layout.tpl b/templates/admin/default/admin-layout.tpl index 743264d7a..559395159 100644 --- a/templates/admin/default/admin-layout.tpl +++ b/templates/admin/default/admin-layout.tpl @@ -44,7 +44,7 @@ {* display top bar only if admin is connected *} - {loop name="top-bar-auth" type="auth" roles="ADMIN"} + {loop name="top-bar-auth" type="auth" role="ADMIN"} {* -- Brand bar section ------------------------------------------------- *} @@ -65,7 +65,7 @@ @@ -107,13 +107,13 @@ {intl l="Home"} - {loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"} + {loop name="menu-auth-customer" type="auth" role="ADMIN" resource="admin.customer" access="VIEW"}
  • {intl l="Customers"}
  • {/loop} - {loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"} + {loop name="menu-auth-order" type="auth" role="ADMIN" resource="admin.order" access="VIEW"} {/loop} - {loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"} + {loop name="menu-auth-catalog" type="auth" role="ADMIN" resource="admin.category" access="VIEW"}
  • {intl l="Catalog"}
  • {/loop} - {loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"} + {loop name="menu-auth-content" type="auth" role="ADMIN" resource="admin.folder" access="VIEW"}
  • {intl l="Folders"}
  • {/loop} - {loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"} + {loop name="menu-auth-coupon" type="auth" role="ADMIN" resource="admin.coupon" access="VIEW"}
  • {intl l="Coupons"}
  • {/loop} - {loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"} + {loop name="menu-auth-config" type="auth" role="ADMIN" resource="admin.config" access="VIEW"}
  • {intl l="Configuration"}
  • {/loop} - {loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"} + {loop name="menu-auth-modules" type="auth" role="ADMIN" resource="admin.module" access="VIEW"}
  • {intl l="Modules"}
  • @@ -174,7 +174,7 @@ {/loop} - {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"} + {loop name="top-bar-search" type="auth" role="ADMIN" resource="admin.search" access="VIEW"}
    @@ -250,6 +250,17 @@ {block name="javascript-initialization"}{/block} + + {* Modules scripts are included now *} {module_include location='footer_js'} diff --git a/templates/admin/default/administrators.html b/templates/admin/default/administrators.html new file mode 100644 index 000000000..9cb4a792a --- /dev/null +++ b/templates/admin/default/administrators.html @@ -0,0 +1,351 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Taxes rules'}{/block} + +{block name="check-resource"}admin.configuration.administrator{/block} +{block name="check-access"}view{/block} + +{block name="main-content"} +
    + +
    + + + + {module_include location='administrators_top'} + +
    +
    + +
    +
    + + + + + + + + + + + + + + {loop type="admin" name="administrators" backend_context="1"} + + + + + + + + + + {/loop} + + +
    + {intl l="Taxes"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.administrator" access="CREATE"} + + + + {/loop} +
    {intl l="Login"}{intl l="FirstName"}{intl l="LastName"}{intl l="Profile"}{intl l="Actions"}
    {$LOGIN}{$FIRSTNAME}{$LASTNAME} + {if $PROFILE} + {loop type="profile" name="admin-profile" id=$PROFILE} + {$TITLE} + {/loop} + {else} + {intl l='Superadministrator'} + {/if} + +
    + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.administrator" access="UPDATE"} + + {/loop} + + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.administrator" access="DELETE"} + + {/loop} +
    +
    +
    +
    + + +
    +
    + + {module_include location='administrators_bottom'} + +
    +
    + +{* -- Add administrator confirmation dialog ----------------------------------- *} +{form name="thelia.admin.administrator.add"} + +{if $form_error_message} + {$administratorCreateError = true} +{else} + {$administratorCreateError = false} +{/if} + +{* Capture the dialog body, to pass it to the generic dialog *} +{capture "administrator_create_dialog"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='login'} +
    + + +
    + {/form_field} + + {form_field form=$form field='firstname'} +
    + + +
    + {/form_field} + + {form_field form=$form field='lastname'} +
    + + +
    + {/form_field} + + {form_field form=$form field='password_confirm'} + {$passwordError = $error} + {/form_field} + + {form_field form=$form field='password'} +
    + + +
    + {/form_field} + + {form_field form=$form field='password_confirm'} +
    + + +
    + {/form_field} + + {form_field form=$form field='profile'} +
    + + + + +
    + {/form_field} + +{/capture} + + {include + file = "includes/generic-create-dialog.html" + + dialog_id = "administrator_create_dialog" + dialog_title = {intl l="Create a new administrator"} + dialog_body = {$smarty.capture.administrator_create_dialog nofilter} + + dialog_ok_label = {intl l="Create"} + dialog_cancel_label = {intl l="Cancel"} + + form_action = {url path="/admin/configuration/administrators/add"} + form_enctype = {form_enctype form=$form} + form_error_message = $form_error_message + } + +{/form} + +{* -- Update administrator confirmation dialog ----------------------------------- *} +{form name="thelia.admin.administrator.update"} + +{if $form_error_message} + {$administratorUpdateError = true} +{else} + {$administratorUpdateError = false} +{/if} + +{* Capture the dialog body, to pass it to the generic dialog *} +{capture "administrator_update_dialog"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='login'} +
    + + +
    + {/form_field} + + {form_field form=$form field='firstname'} +
    + + +
    + {/form_field} + + {form_field form=$form field='lastname'} +
    + + +
    + {/form_field} + + {form_field form=$form field='password_confirm'} + {$passwordError = $error} + {/form_field} + + {form_field form=$form field='password'} +
    + + +
    + {/form_field} + + {form_field form=$form field='password_confirm'} +
    + + +
    + {/form_field} + + {form_field form=$form field='profile'} +
    + + + + +
    + {/form_field} + +{/capture} + + {include + file = "includes/generic-create-dialog.html" + + dialog_id = "administrator_update_dialog" + dialog_title = {intl l="Update a new administrator"} + dialog_body = {$smarty.capture.administrator_update_dialog nofilter} + + dialog_ok_label = {intl l="Update"} + dialog_cancel_label = {intl l="Cancel"} + + form_action = {url path="/admin/configuration/administrators/save"} + form_enctype = {form_enctype form=$form} + form_error_message = $form_error_message + } + +{/form} + +{* -- Delete administrator confirmation dialog ----------------------------------- *} + +{capture "administrator_delete_dialog"} + + + {module_include location='administrator_delete_form'} + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "administrator_delete_dialog" + dialog_title = {intl l="Delete administrator"} + dialog_message = {intl l="Do you really want to delete this administrator ?"} + + form_action = {url path='/admin/configuration/administrators/delete'} + form_content = {$smarty.capture.administrator_delete_dialog nofilter} +} + +{include + file = "includes/generic-warning-dialog.html" + + dialog_id = "administrator_cannot_delete_dialog" + dialog_title = {intl l="You can't delete this administrator"} + dialog_body = {intl l="They are some administrator which are linked to this administrator. Please edit/remove them before deleting this administrator."} +} + +{/block} + +{block name="javascript-initialization"} + +{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} + +{/javascripts} + +{javascripts file='assets/js/main.js'} + +{/javascripts} + + + +{/block} \ No newline at end of file diff --git a/templates/admin/default/ajax/language-update-modal.html b/templates/admin/default/ajax/language-update-modal.html new file mode 100644 index 000000000..909b351b0 --- /dev/null +++ b/templates/admin/default/ajax/language-update-modal.html @@ -0,0 +1,64 @@ +{* Update an Address *} + +{form name="thelia.lang.update"} + +{* Capture the dialog body, to pass it to the generic dialog *} +{capture "edit_lang_dialog"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='title'} +
    + + +
    + {/form_field} + + {form_field form=$form field='code'} +
    + + +
    + {/form_field} + + {form_field form=$form field='locale'} +
    + + +
    + {/form_field} + + {form_field form=$form field='date_format'} +
    + + +
    + {/form_field} + + {form_field form=$form field='time_format'} +
    + + +
    + {/form_field} + + + +{/capture} + + {include + file = "includes/generic-create-dialog.html" + + dialog_id = "edit_lang_dialog" + dialog_title = {intl l="Edit a language"} + dialog_body = {$smarty.capture.edit_lang_dialog nofilter} + +dialog_ok_label = {intl l="Edit this language"} +dialog_cancel_label = {intl l="Cancel"} + +form_action = {url path="/admin/configuration/languages/save/{$lang_id}"} +form_enctype = {form_enctype form=$form} +form_error_message = $form_error_message +} + +{/form} \ No newline at end of file diff --git a/templates/admin/default/ajax/product-related-tab.html b/templates/admin/default/ajax/product-related-tab.html index 24c8b71a1..b0aa1077b 100644 --- a/templates/admin/default/ajax/product-related-tab.html +++ b/templates/admin/default/ajax/product-related-tab.html @@ -104,7 +104,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.content.delete"} + {loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"} @@ -225,7 +225,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.accessory.delete"} + {loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"} @@ -331,7 +331,7 @@
    - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resources="admin.product" access="UPDATE"} diff --git a/templates/admin/default/ajax/template-attribute-list.html b/templates/admin/default/ajax/template-attribute-list.html index 27d4f9831..619d13d53 100644 --- a/templates/admin/default/ajax/template-attribute-list.html +++ b/templates/admin/default/ajax/template-attribute-list.html @@ -64,7 +64,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.attribute.delete"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"} diff --git a/templates/admin/default/ajax/template-feature-list.html b/templates/admin/default/ajax/template-feature-list.html index 26b09baea..24b50918e 100644 --- a/templates/admin/default/ajax/template-feature-list.html +++ b/templates/admin/default/ajax/template-feature-list.html @@ -66,7 +66,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.feature.delete"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"} diff --git a/templates/admin/default/assets/js/coupon.js b/templates/admin/default/assets/js/coupon.js index 68cfb42e9..2c412765a 100644 --- a/templates/admin/default/assets/js/coupon.js +++ b/templates/admin/default/assets/js/coupon.js @@ -55,7 +55,7 @@ $(function($){ $.couponManager.conditionToSave = $.couponManager.conditionsToSave[id]; // Set the condition selector - $("#category-rule option").filter(function() { + $("#category-condition option").filter(function() { return $(this).val() == $.couponManager.conditionToSave.serviceId; }).prop('selected', true); @@ -89,8 +89,8 @@ $(function($){ // Save conditions on click $.couponManager.onClickSaveCondition = function() { - $('#constraint-save-btn').on('click', function () { - if($('#category-rule').val() == 'thelia.condition.match_for_everyone') { + $('#condition-save-btn').on('click', function () { + if($('#category-condition').val() == 'thelia.condition.match_for_everyone') { // // @todo translate message + put it in modal var r = confirm("Do you really want to set this coupon available to everyone ?"); if (r == true) { @@ -106,7 +106,7 @@ $(function($){ // Remove condition on click $.couponManager.onClickDeleteCondition = function() { - $('.constraint-delete-btn').on('click', function (e) { + $('.condition-delete-btn').on('click', function (e) { e.preventDefault(); var $this = $(this); $.couponManager.removeConditionAjax($this.attr('data-int')); @@ -140,7 +140,7 @@ $(function($){ // Reload condition inputs when changing effect $.couponManager.onConditionChange = function() { - $('#category-rule').on('change', function () { + $('#category-condition').on('change', function () { $.couponManager.loadConditionInputs($(this).val(), function() {}); }); }; @@ -152,9 +152,9 @@ $(function($){ // Set max usage to unlimited or not $.couponManager.onUsageUnlimitedChange = function() { - var isUnlimited = $('#is-unlimited'); + var $isUnlimited = $('#is-unlimited'); if ($('#max-usage').val() == -1) { - isUnlimited.prop('checked', true); + $isUnlimited.prop('checked', true); $('#max-usage').hide(); $('#max-usage-label').hide(); } else { @@ -163,7 +163,7 @@ $(function($){ $('#max-usage-label').show(); } - isUnlimited.change(function(){ + $isUnlimited.change(function(){ var $this = $(this); if ($this.is(':checked')) { $('#max-usage').hide().val('-1'); diff --git a/templates/admin/default/assets/js/jquery.typewatch.js b/templates/admin/default/assets/js/jquery.typewatch.js new file mode 100644 index 000000000..13b754385 --- /dev/null +++ b/templates/admin/default/assets/js/jquery.typewatch.js @@ -0,0 +1,94 @@ +/* +* TypeWatch 2.2 +* +* Examples/Docs: github.com/dennyferra/TypeWatch +* +* Copyright(c) 2013 +* Denny Ferrassoli - dennyferra.com +* Charles Christolini +* +* Dual licensed under the MIT and GPL licenses: +* http://www.opensource.org/licenses/mit-license.php +* http://www.gnu.org/licenses/gpl.html +*/ + +(function(jQuery) { + jQuery.fn.typeWatch = function(o) { + // The default input types that are supported + var _supportedInputTypes = + ['TEXT', 'TEXTAREA', 'PASSWORD', 'TEL', 'SEARCH', 'URL', 'EMAIL', 'DATETIME', 'DATE', 'MONTH', 'WEEK', 'TIME', 'DATETIME-LOCAL', 'NUMBER', 'RANGE']; + + // Options + var options = jQuery.extend({ + wait: 750, + callback: function() { }, + highlight: true, + captureLength: 2, + inputTypes: _supportedInputTypes + }, o); + + function checkElement(timer, override) { + var value = jQuery(timer.el).val(); + + // Fire if text >= options.captureLength AND text != saved text OR if override AND text >= options.captureLength + if ((value.length >= options.captureLength && value.toUpperCase() != timer.text) + || (override && value.length >= options.captureLength)) + { + timer.text = value.toUpperCase(); + timer.cb.call(timer.el, value); + } + }; + + function watchElement(elem) { + var elementType = elem.type.toUpperCase(); + if (jQuery.inArray(elementType, options.inputTypes) >= 0) { + + // Allocate timer element + var timer = { + timer: null, + text: jQuery(elem).val().toUpperCase(), + cb: options.callback, + el: elem, + wait: options.wait + }; + + // Set focus action (highlight) + if (options.highlight) { + jQuery(elem).focus( + function() { + this.select(); + }); + } + + // Key watcher / clear and reset the timer + var startWatch = function(evt) { + var timerWait = timer.wait; + var overrideBool = false; + var evtElementType = this.type.toUpperCase(); + + // If enter key is pressed and not a TEXTAREA and matched inputTypes + if (typeof evt.keyCode != 'undefined' && evt.keyCode == 13 && evtElementType != 'TEXTAREA' && jQuery.inArray(evtElementType, options.inputTypes) >= 0) { + timerWait = 1; + overrideBool = true; + } + + var timerCallbackFx = function() { + checkElement(timer, overrideBool) + } + + // Clear timer + clearTimeout(timer.timer); + timer.timer = setTimeout(timerCallbackFx, timerWait); + }; + + jQuery(elem).on('keydown paste cut input', startWatch); + } + }; + + // Watch Each Element + return this.each(function() { + watchElement(this); + }); + + }; +})(jQuery); \ No newline at end of file diff --git a/templates/admin/default/attribute-edit.html b/templates/admin/default/attribute-edit.html index 1b3417ef6..e9a09c719 100644 --- a/templates/admin/default/attribute-edit.html +++ b/templates/admin/default/attribute-edit.html @@ -66,7 +66,7 @@ {intl l='Attribute values'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"} @@ -148,7 +148,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"} diff --git a/templates/admin/default/attributes.html b/templates/admin/default/attributes.html index 28a927920..6a4eb7f46 100644 --- a/templates/admin/default/attributes.html +++ b/templates/admin/default/attributes.html @@ -27,7 +27,7 @@ {intl l='Thelia product attributes'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="CREATE"} @@ -77,7 +77,7 @@ {$ID} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"} {$TITLE} {/loop} {elseloop rel="can_change"} @@ -100,7 +100,7 @@ {module_include location='attributes_table_row'} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
    @@ -112,11 +112,11 @@ {/loop}
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"} {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 89c0e6923..549d52d23 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -31,7 +31,7 @@ {module_include location='category_list_caption'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.category" access="CREATE"} @@ -113,7 +113,7 @@ {module_include location='category_list_row'} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.category" access="UPDATE"}
    @@ -142,11 +142,11 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.category" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.category" access="DELETE"} {/loop}
    @@ -161,7 +161,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.category" access="CREATE"} {intl l="This category has no sub-categories. To create a new one, click the + button above."} {/loop} @@ -281,7 +281,7 @@ {module_include location='product_list_row'} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.products.edit"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.product" access="UPDATE"}
    @@ -308,11 +308,11 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.product" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.product" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/category-edit.html b/templates/admin/default/category-edit.html index ceefa53bb..340e7cbbd 100755 --- a/templates/admin/default/category-edit.html +++ b/templates/admin/default/category-edit.html @@ -231,7 +231,7 @@
    - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"} diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html index 16c09bac2..14f195270 100644 --- a/templates/admin/default/configuration.html +++ b/templates/admin/default/configuration.html @@ -24,42 +24,42 @@ {module_include location='catalog_configuration_top'} - {loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"} + {loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.template" access="VIEW"} {intl l='Product templates'} {/loop} - {loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"} + {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.attribute" access="VIEW"} {intl l='Product attributes'} {/loop} - {loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"} + {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.feature" access="VIEW"} {intl l='Product features'} {/loop} - {loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"} + {loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.message" access="VIEW"} {intl l='Mailing templates'} {/loop} - {loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.currencies"} + {loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.currency" access="VIEW"} {intl l='Currencies'} {/loop} - {loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.taxe-rules"} + {loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.tax-rule" access="VIEW"} {intl l='Taxes rules'} @@ -80,21 +80,21 @@ {module_include location='shipping_configuration_top'} - {loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.contries"} + {loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.contry" access="VIEW"} {intl l='Countries'} {/loop} - {loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.shipping_zones"} + {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.shipping-zone" access="VIEW"} {intl l='Shipping zones'} {/loop} - {loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.shipping_configuration"} + {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.shipping-configuration" access="VIEW"} {intl l='Shipping configuration'} @@ -116,56 +116,56 @@ {module_include location='system_configuration_top'} - {loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.modules"} + {loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.module" access="VIEW"} {intl l='Modules activation'} {/loop} - {loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.variables"} + {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.variable" access="VIEW"} {intl l='System variables'} {/loop} - {loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.profiles"} + {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.profile" access="VIEW"} {intl l='Administration profiles'} {/loop} - {loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.admin_users"} + {loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.administrator" access="VIEW"} {intl l='Administrators'} {/loop} - {loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.languages"} + {loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.language" access="VIEW"} {intl l='Languages & URLs'} {/loop} - {loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.mailing_system"} + {loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"} {intl l='Mailing system'} {/loop} - {loop type="auth" name="pcc7" roles="ADMIN" permissions="admin.configuration.admin_logs"} + {loop type="auth" name="pcc7" role="ADMIN" resource="admin.configuration.admin-logs" access="VIEW"} {intl l='Administration logs'} {/loop} - {loop type="auth" name="pcc8" roles="ADMIN" permissions="admin.configuration.system_logs"} + {loop type="auth" name="pcc8" role="ADMIN" resource="admin.configuration.system-logs" access="VIEW"} {intl l='System logs'} diff --git a/templates/admin/default/countries.html b/templates/admin/default/countries.html index ec89063ee..b2d18936e 100644 --- a/templates/admin/default/countries.html +++ b/templates/admin/default/countries.html @@ -28,7 +28,7 @@
    {intl l='Countries'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.country" access="CREATE"} @@ -71,13 +71,13 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.country" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.country" access="DELETE"} diff --git a/templates/admin/default/coupon-create.html b/templates/admin/default/coupon-create.html index f82501916..19f4bf795 100755 --- a/templates/admin/default/coupon-create.html +++ b/templates/admin/default/coupon-create.html @@ -45,9 +45,25 @@ {/javascripts} - {**} - {**} + {/javascripts} + - - {/javascripts} {javascripts file='assets/js/main.js'} @@ -270,4 +271,39 @@ {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} {/javascripts} + + {/block} \ No newline at end of file diff --git a/templates/admin/default/messages.html b/templates/admin/default/messages.html index 48d3383f1..8a4be251b 100644 --- a/templates/admin/default/messages.html +++ b/templates/admin/default/messages.html @@ -26,7 +26,7 @@
    {intl l='Thelia mailing templates'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.message" access="CREATE"} @@ -52,7 +52,7 @@
    {if ! $SECURED} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.message" access="UPDATE"} {$NAME} {/loop} {elseloop rel="can_change"} @@ -68,11 +68,11 @@ {if ! $SECURED}
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.message" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.message" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/modules.html b/templates/admin/default/modules.html index 9f9664e22..e6c6eb669 100644 --- a/templates/admin/default/modules.html +++ b/templates/admin/default/modules.html @@ -15,7 +15,7 @@
  • {intl l="Home"}
  • {intl l="Modules"}
  • - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.modules.install"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.module" access="UPDATE"} {intl l="Install a new module"} diff --git a/templates/admin/default/orders.html b/templates/admin/default/orders.html index 9edc56e9b..d237d228a 100644 --- a/templates/admin/default/orders.html +++ b/templates/admin/default/orders.html @@ -74,7 +74,7 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.update"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.order" access="UPDATE"} {if $STATUS !== 5} diff --git a/templates/admin/default/product-edit.html b/templates/admin/default/product-edit.html index 75b85c82b..2a2d94ca8 100644 --- a/templates/admin/default/product-edit.html +++ b/templates/admin/default/product-edit.html @@ -136,12 +136,16 @@ {/javascripts} + {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'} + + {/javascripts} -{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'} - -{/javascripts} + {javascripts file='assets/js/jquery.typewatch.js'} + + {/javascripts} + diff --git a/templates/admin/default/profile-edit.html b/templates/admin/default/profile-edit.html index db3cbd0e2..a7c2e0f9d 100644 --- a/templates/admin/default/profile-edit.html +++ b/templates/admin/default/profile-edit.html @@ -32,7 +32,8 @@
    @@ -116,113 +117,168 @@
    -
    +
    -
    - {intl l="Manage permissions"} -
    -{* -
    - - - - - -
    + {form name="thelia.admin.profile.resource-access.modification"} -

    {intl l="Countries that have the same profile"} :

    -

    +

    - {$matchedCountries.first=$asked_country} + {form_hidden_fields form=$form} - {loop type="profile-country" name="same-country-list" profile=$ID ask="countries" country=$asked_country} - {$matchedCountries[]=$COUNTRY} - {$COUNTRY_TITLE} - {/loop} + {* Be sure to get the product ID, even if the form could not be validated *} + - {elseloop rel="same-country-list"} - {intl l="NONE"} - {/elseloop} -

    - + {if $form_error}
    {$form_error_message}
    {/if} -
    -
    + + + + + + + + + + + + + + + + -
    -
    -

    {intl l="Manage the profile taxes appliance order"}

    -
    -
    - {assign lastPosition 0} - {loop type="profile-country" name="existing-tax-list" profile=$ID country=$asked_country} - {if $POSITION != $lastPosition} - {assign lastPosition $POSITION} - {if $LOOP_COUNT > 1} -
    - {/if} -
    -

    - - {intl l="Add tax to this group"} -

    - {/if} + {form_tagged_fields form=$form tag='resources'} -
    {$TAX_TITLE}
    + {loop type="resource" name="resource-list" code=$attr_list.resource_code profile=$ID backend_context="1"} - {if $LOOP_COUNT == $LOOP_TOTAL} -
    - {/if} - {/loop} +
    + + + + + + + - {elseloop rel="existing-tax-list"} -
    -

    - - {intl l="Add tax to this group"} -

    -
    + {/loop} - {/elseloop} + {/form_tagged_fields} - - - + + + + + + +
    + {intl l="Manage resource rights"} + +
    {intl l="Resource"}{intl l="Title"}{intl l="Rights"}
    {intl l="View"}{intl l="Create"}{intl l="Update"}{intl l="Delete"}
    {$CODE}{$TITLE} +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    - {intl l="Apply"} + -
    -
    + {/form} -
    -
    -

    Available taxes

    -
    -
    - {loop type="tax" name="tax-list" exclude_profile=$ID country=$asked_country} -
    {$TITLE}
    - {/loop} -
    - -
    +
    -
    +
    + + {form name="thelia.admin.profile.module-access.modification"} + +
    + + {form_hidden_fields form=$form} + + {* Be sure to get the product ID, even if the form could not be validated *} + + + {if $form_error}
    {$form_error_message}
    {/if} + + + + + + + + + + + + + + + + + + + {form_tagged_fields form=$form tag='modules'} + + {loop type="module" name="module-list" code=$attr_list.module_code profile=$ID backend_context="1"} + + + + + + + + + + + {/loop} + + {/form_tagged_fields} + + + + + + + +
    + {intl l="Manage module rights"} + +
    {intl l="Module"}{intl l="Title"}{intl l="Rights"}
    {intl l="View"}{intl l="Create"}{intl l="Update"}{intl l="Delete"}
    {$CODE}{$TITLE} +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    + +
    + + {/form} - *}
    @@ -235,60 +291,6 @@
    -{* Confirmation dialog *} - {*form name="thelia.admin.profile.taxlistupdate"} - - {if $form_error_message} - {$taxUpdateError = true} - {else} - {$taxUpdateError = false} - {/if} - - {* Capture the dialog body, to pass it to the generic dialog *} - {*capture "tax_list_update_dialog"} - - - - - {form_hidden_fields form=$form} - - {form_field form=$form field='country_list'} - -

    {intl l="Profile taxes will be update for the following countries :"}

    -
    -
    - - - - -
    -
    - - {/form_field} - - {/capture} - - {include - file = "includes/generic-create-dialog.html" - - dialog_id = "tax_list_update_dialog" - dialog_title = {intl l="Update profile taxes"} - dialog_body = {$smarty.capture.tax_list_update_dialog nofilter} - - dialog_ok_label = {intl l="Edit profile taxes"} - dialog_cancel_label = {intl l="Cancel"} - - form_action = {url path="/admin/configuration/profiles/saveTaxes"} - form_enctype = {form_enctype form=$form} - form_error_message = $form_error_message - } - - {/form*} - {/block} {block name="javascript-initialization"} @@ -297,6 +299,10 @@ {/javascripts} + {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'} + + {/javascripts} + {javascripts file='assets/js/main.js'} {/javascripts} diff --git a/templates/admin/default/profiles.html b/templates/admin/default/profiles.html index 3bb18be31..7c4950b02 100644 --- a/templates/admin/default/profiles.html +++ b/templates/admin/default/profiles.html @@ -28,7 +28,7 @@
    {intl l="Taxes"} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.profile.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.profile" access="CREATE"} @@ -50,13 +50,13 @@
    {$DESCRIPTION}
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.profile.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.profile" access="UPDATE"} {/loop} {assign linkedAdminCount {count name="linked-admin" type="admin" profile=$ID}} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.profile.change"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.profile" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/shipping-configuration.html b/templates/admin/default/shipping-configuration.html index b488b5eb1..2f0892c1f 100644 --- a/templates/admin/default/shipping-configuration.html +++ b/templates/admin/default/shipping-configuration.html @@ -25,7 +25,7 @@
    {intl l='Thelia Shipping configuration'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.shipping-configuration" access="CREATE"} @@ -50,10 +50,10 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-configuration" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.shipping-configuration" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/shipping-zones.html b/templates/admin/default/shipping-zones.html index bff616cf8..29e2ba346 100644 --- a/templates/admin/default/shipping-zones.html +++ b/templates/admin/default/shipping-zones.html @@ -45,7 +45,7 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-zone" access="UPDATE"} {/loop}
    diff --git a/templates/admin/default/taxes-rules.html b/templates/admin/default/taxes-rules.html index 0a48d18a1..15b7ae614 100644 --- a/templates/admin/default/taxes-rules.html +++ b/templates/admin/default/taxes-rules.html @@ -48,7 +48,7 @@
    {intl l="Taxes"} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.taxes.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.tax" access="CREATE"} @@ -70,11 +70,11 @@
    {$DESCRIPTION}
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"} {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"} {/loop}
    @@ -93,7 +93,7 @@
    {intl l="Taxes rules"} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.taxes-rules.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"} @@ -121,12 +121,12 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"} {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.dele"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/templates.html b/templates/admin/default/templates.html index 95d92d1a9..42b874cfd 100644 --- a/templates/admin/default/templates.html +++ b/templates/admin/default/templates.html @@ -32,7 +32,7 @@
    {intl l='Thelia product templates'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="CREATE"} @@ -72,7 +72,7 @@
    {$ID} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="UPDATE"} {$NAME} {/loop} {elseloop rel="can_change"} @@ -84,11 +84,11 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="UPDATE"} {/loop} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="DELETE"} {/loop}
    diff --git a/templates/admin/default/variables.html b/templates/admin/default/variables.html index a7a2b9c09..7cdad3afc 100644 --- a/templates/admin/default/variables.html +++ b/templates/admin/default/variables.html @@ -26,7 +26,7 @@ @@ -158,7 +163,15 @@
    {intl l='Thelia system variables'} - {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.variables.create"} + {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.variable" access="CREATE"}
    {if ! $SECURED} - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.variable" access="UPDATE"} {$NAME} {/loop} {elseloop rel="can_change"} @@ -108,11 +108,11 @@
    - {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"} + {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.variable" access="UPDATE"} {/loop} - {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.variables.delete"} + {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.variable" access="DELETE"} {/loop}
    diff --git a/templates/default/layout.tpl b/templates/default/layout.tpl index a044b35a2..37d275aa9 100644 --- a/templates/default/layout.tpl +++ b/templates/default/layout.tpl @@ -67,7 +67,7 @@ URL: http://www.thelia.net
    -
    - - - - -
    + {form_field form=$form field='coupon-code'} +
    + + + + + + {if $error}{$message}{/if} +
    + {/form_field} +
    + + {/form} + {form name="thelia.order.payment"} +
    + + {form_hidden_fields form=$form} + + {if $form_error}
    {$form_error_message}
    {/if}
    {loop type="address" name="delivery-address" id={order attr="delivery_address"}} diff --git a/web/install/bootstrap.php b/web/install/bootstrap.php index 522f6483b..90e395c88 100755 --- a/web/install/bootstrap.php +++ b/web/install/bootstrap.php @@ -20,7 +20,7 @@ /* along with this program. If not, see . */ /* */ /*************************************************************************************/ - +define('THELIA_INSTALL_MODE', true); include __DIR__ . "/../../core/bootstrap.php"; $thelia = new \Thelia\Core\Thelia("install", false); diff --git a/web/install/config.php b/web/install/config.php index 9ba221cdd..ca937286c 100755 --- a/web/install/config.php +++ b/web/install/config.php @@ -93,8 +93,8 @@ $_SESSION['install']['step'] = $step;
    - - + +
    diff --git a/web/install/end.php b/web/install/end.php index a86c2d903..9113a8786 100755 --- a/web/install/end.php +++ b/web/install/end.php @@ -35,23 +35,38 @@ if($_SESSION['install']['step'] == 5) { ->setLastname('admin') ->save(); - $config = new \Thelia\Model\Config(); - $config->setName('contact_email') - ->setValue($_POST['email_contact']) - ->save(); - ; + + \Thelia\Model\ConfigQuery::create() + ->filterByName('contact_email') + ->update(array('Value' => $_POST['email_contact'])); + + \Thelia\Model\ConfigQuery::create() + ->filterByName('company_name') + ->update(array('Value' => $_POST['company_name'])); } +//clean up cache directories +$fs = new \Symfony\Component\Filesystem\Filesystem(); + +$fs->remove(THELIA_ROOT . '/cache/prod'); +$fs->remove(THELIA_ROOT . '/cache/dev'); + + +$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals(); $_SESSION['install']['step'] = $step; ?>

    - Thank you have installed Thelia + Thanks, you have installed Thelia

    Don't forget to delete the web/install directory.

    +

    + Go to back office +

    +
    \ No newline at end of file diff --git a/web/test_to_remove/admin-stats.json b/web/test_to_remove/admin-stats.json old mode 100755 new mode 100644 index 27a717160..220b140c4 --- a/web/test_to_remove/admin-stats.json +++ b/web/test_to_remove/admin-stats.json @@ -1,6 +1,6 @@ -{ - "title" : "Stats on September 2013", - "series" : [ +{ + "title" : "Stats on September 2013", + "series" : [ { "datas" : [[0,10.00],[1,200.00],[2,5.00],[3,2.75],[4,20.30],[5,14.09],[6,5],[7,23],[8,5],[9,42],[10,0],[11,4],[12,78],[13,75],[14,70],[15,65],[16,102],[17,50],[18,27],[19,35],[20,37],[21,29],[22,56],[23,52],[24,12],[25,6],[26,82],[27,32],[28,15],[29,50],[30,42]], "color" : "#adadad" @@ -22,4 +22,4 @@ "color" : "#d9534f" } ] -} \ No newline at end of file +}