supprimé:        core/lib/Thelia/Controller/Admin/CustomerExportController.php
	modifié:         core/lib/Thelia/Controller/Admin/ExportController.php
	modifié:         core/lib/Thelia/Controller/Admin/ImportController.php
	modifié:         core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php
	modifié:         core/lib/Thelia/Core/Event/ImportExport.php
	modifié:         core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderManager.php
	modifié:         core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderManagerTrait.php
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/Exception/BadFormattedStringException.php
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/Formatter/XMLFormatter.php
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/FormatterManager.php
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/FormatterManagerTrait.php
	modifié:         core/lib/Thelia/Core/Template/Loop/ImportExportType.php
	modifié:         core/lib/Thelia/Model/Export.php
	modifié:         core/lib/Thelia/Model/Import.php
This commit is contained in:
Benjamin Perche
2014-07-18 14:35:07 +02:00
parent 4c165bc5d5
commit 0723f30695
14 changed files with 30 additions and 72 deletions

View File

@@ -12,7 +12,6 @@
namespace Thelia\Core\DependencyInjection\Loader;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\Propel;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Config\Util\XmlUtils;

View File

@@ -109,7 +109,7 @@ class ImportExport extends ActionEvent
}
/**
* @param FormatterData $data
* @param FormatterData $data
* @return $this
*/
public function setData(FormatterData $data)
@@ -146,5 +146,4 @@ class ImportExport extends ActionEvent
return $this->content;
}
}

View File

@@ -141,7 +141,8 @@ class ArchiveBuilderManager
}
}
public function getMimeTypes() {
public function getMimeTypes()
{
$mimeTypes = [];
/** @var AbstractArchiveBuilder $formatter */

View File

@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
trait ArchiveBuilderManagerTrait
{
/**
* @param ContainerInterface $container
* @param ContainerInterface $container
* @return \Thelia\Core\FileFormat\Archive\ArchiveBuilderManager
*/
public function getArchiveBuilderManager(ContainerInterface $container)

View File

@@ -10,7 +10,7 @@
/* file that was distributed with this source code. */
/*************************************************************************************/
namespace Thelia\Core\FileFormat\Formatter\Exception;
namespace Thelia\Core\FileFormat\Formatting\Exception;
/**
* Class BadFormattedStringException

View File

@@ -12,7 +12,7 @@
namespace Thelia\Core\FileFormat\Formatting\Formatter;
use Symfony\Component\DependencyInjection\SimpleXMLElement;
use Thelia\Core\FileFormat\Formatter\Exception\BadFormattedStringException;
use Thelia\Core\FileFormat\Formatting\Exception\BadFormattedStringException;
use Thelia\Core\FileFormat\Formatting\AbstractFormatter;
use Thelia\Core\FileFormat\Formatting\FormatterData;
use Thelia\Core\FileFormat\FormatType;
@@ -165,7 +165,8 @@ class XMLFormatter extends AbstractFormatter
return $parent === null ? $data : $parent;
}
public function getValue($name, array &$data) {
public function getValue($name, array &$data)
{
$value = $data[$name];
unset ($data[$name]);
@@ -175,7 +176,7 @@ class XMLFormatter extends AbstractFormatter
/**
* @param $rawData
* @return array
* @throws \Thelia\Core\FileFormat\Formatter\Exception\BadFormattedStringException
* @throws \Thelia\Core\FileFormat\Formatting\Exception\BadFormattedStringException
*/
public function rawDecode($rawData)
{

View File

@@ -119,7 +119,8 @@ class FormatterManager
return $extensions;
}
public function getExtensionsByTypes($types, $withDot = false) {
public function getExtensionsByTypes($types, $withDot = false)
{
$extensions = [];
/** @var AbstractFormatter $formatter */
@@ -174,7 +175,8 @@ class FormatterManager
return $selectedFormatters;
}
public function getMimeTypesByTypes($types) {
public function getMimeTypesByTypes($types)
{
if (!is_array($types)) {
$types = [$types];
}

View File

@@ -21,11 +21,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
trait FormatterManagerTrait
{
/**
* @param ContainerInterface $container
* @param ContainerInterface $container
* @return \Thelia\Core\FileFormat\Formatting\FormatterManager
*/
public function getFormatterManager(ContainerInterface $container)
{
return $container->get("thelia.manager.formatter_manager");
}
}
}

View File

@@ -59,10 +59,9 @@ abstract class ImportExportType extends BaseI18nLoop implements PropelSearchLoop
->set("POSITION", $type->getPosition())
->set("CATEGORY_ID", $type->getByName($this->getCategoryName()))
;
} catch(ClassNotFoundException $e) {
} catch(\ErrorException $e) {}
} catch (ClassNotFoundException $e) {
} catch (\ErrorException $e) {}
$loopResult->addRow($loopResultRow);
}