Commit f6bdb2df authored by Dirk Wildt's avatar Dirk Wildt

4.1.0

parent 01a29f2e
4.1.0
Feature
2018-06-16
* #i0025: Get support for COA elements 10, 20, 30, ... as XML tag:
You may use: <_10>...</_10>
This will moved to a json string like: ...,"_10":{... replaced and moved to an array
See
* Classes/Controller/AbstractController.php
4.0.1
Bugfix
2018-03-11
......
......@@ -10,7 +10,7 @@ use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
/* * *************************************************************
* Copyright notice
*
* (c) 2017 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2017-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......@@ -835,15 +835,15 @@ class AbstractController extends ActionController
}
/**
* _getXmlFileAsArray( ) :
* _getXmlFile( ) :
*
* @param string $pathToXml
* @return array
* @access private
* @version 2.0.0
* @since 2.0.0
* @version 4.1.0
* @since 4.1.0
*/
private function _getXmlFileAsArray( $pathToXml )
private function _getXmlFile( $pathToXml )
{
$filename = PATH_site . $pathToXml;
......@@ -852,13 +852,31 @@ class AbstractController extends ActionController
$sXml = fread( $handle, filesize( $filename ) );
fclose( $handle );
return $sXml;
}
/**
* _getXmlFileAsArray( ) :
*
* @param string $pathToXml
* @return array
* @access private
* @version 4.1.0
* @since 2.0.0
*/
private function _getXmlFileAsArray( $pathToXml )
{
$sXml = $this->_getXmlFile( $pathToXml );
$aXml = GeneralUtility::xml2array( $sXml );
if( is_array( $aXml ) )
{
// #i0025, 180616, dwildt, 1+
$aXml = $this->_optimiseCOA( $aXml );
return $aXml;
}
$filename = PATH_site . $pathToXml;
$header = 'FATAL ERROR: xml-file isn\'t proper';
$text = ''
. '<p>'
......@@ -1167,6 +1185,30 @@ class AbstractController extends ActionController
$this->_iCurrTime = time();
}
/**
* _optimiseCOA( )
*
* @param array $aXml
* @return array $aXml
* @access private
* @version 4.1.0
* @since 4.1.0
* @internal #i0025, https://www.phpliveregex.com/
*/
private function _optimiseCOA( $aXml )
{
// // Will move <_10> and </_10> to <10> and </10>
// $regex = '/<(\/?)_(\d+)>/';
// Will move ,"_10":{ to ,"10":{
$regex = '/,"_(\d+)":{/';
$replacement = ',"$1":{';
$sXml = json_encode( ( array ) $aXml );
var_dump( __METHOD__, __LINE__, $sXml);
$sXml = preg_replace($regex, $replacement, $sXml);
$aXml = json_decode( $sXml, true );
return $aXml;
}
/**
* _requirementsContent( ) :
*
......
......@@ -5,7 +5,7 @@ namespace Netzmacher\Launch\Controller;
/* * *************************************************************
* Copyright notice
*
* (c) 2017 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2017-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
......@@ -7,7 +7,7 @@ use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/* * *************************************************************
* Copyright notice
*
* (c) 2015-2017 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2015-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
......@@ -34,7 +34,7 @@ Launch it!
launch, installer
:Copyright:
2017
2017-2018
:Author:
Dirk Wildt (Die Netzmacher)
......
conf.py:
copyright: 2017
copyright: 2017-2018
project: Launch it!
version: 2.4
release: 2.4.1
version: 4.1
release: 4.1.0
latex_documents:
- - Index
- launch.tex
......
......@@ -6,7 +6,7 @@ $EM_CONF[$_EXTKEY] = [
'state' => 'stable',
'author' => 'Dirk Wildt (Die Netzmacher)',
'author_email' => 'http://wildt.at.die-netzmacher.de',
'version' => '4.0.1',
'version' => '4.1.0',
'constraints' => [
'depends' => [
'refresh' => '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment