Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
QueryWriter example
if
(
!
file_exists
(
$snippetsDir
)
)
{
return
[
]
;
}
$locales
=
[
]
;
$finder
=
new
Finder
(
)
;
$inputAdapter
=
new
Enlight_Config_Adapter_File
(
[
'configDir' =>
$snippetsDir
,
]
)
;
$queryWriter
=
new
QueryWriter
(
)
;
$finder
->
files
(
)
->
in
(
$snippetsDir
)
;
foreach
(
$finder
as
$file
)
{
$filePath
=
$file
->
getRelativePathname
(
)
;
if
(
strpos
(
$filePath
, '.ini'
)
== \
strlen
(
$filePath
)
- 4
)
{
$namespace
=
substr
(
$filePath
, 0, -4
)
;
}
else
{
continue
;
}
$namespaceData
=
new
Enlight_Components_Snippet_Namespace
(
[