Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
PoMemoryWriter example
public
static
function
filesToArray
(
$langcode
, array
$files
)
{
$writer
=
new
PoMemoryWriter
(
)
;
$writer
->
setLangcode
(
$langcode
)
;
foreach
(
$files
as
$file
)
{
$reader
=
new
PoStreamReader
(
)
;
$reader
->
setURI
(
$file
->uri
)
;
$reader
->
setLangcode
(
$langcode
)
;
$reader
->
open
(
)
;
$writer
->
writeItems
(
$reader
, -1
)
;
}
return
$writer
->
getData
(
)
;
}
}