Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isValidModule example
$path
=
trim
(
$pathInfo
,
$this
->separator
)
;
if
(
empty
(
$path
)
)
{
return
false;
}
$query
=
[
]
;
$params
=
[
]
;
foreach
(
explode
(
$this
->separator,
$path
)
as
$i
=>
$routePart
)
{
$routePart
=
urldecode
(
$routePart
)
;
if
(
$i
=== 0 &&
empty
(
$query
[
$context
->
getModuleKey
(
)
]
)
&&
$this
->dispatcher->
isValidModule
(
$routePart
)
)
{
$query
[
$context
->
getModuleKey
(
)
]
=
$routePart
;
}
elseif
(
empty
(
$query
[
$context
->
getControllerKey
(
)
]
)
)
{
$query
[
$context
->
getControllerKey
(
)
]
=
$routePart
;
}
elseif
(
empty
(
$query
[
$context
->
getActionKey
(
)
]
)
)
{
$query
[
$context
->
getActionKey
(
)
]
=
$routePart
;
}
else
{
$params
[
]
=
$routePart
;
}
}
if
(
$params
)
{