Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getControllerError example
$controller
[
0
]
=
$this
->
instantiateController
(
$controller
[
0
]
)
;
}
catch
(
\Error|\LogicException
$e
)
{
if
(
\
is_callable
(
$controller
)
)
{
return
$controller
;
}
throw
$e
;
}
}
if
(
!\
is_callable
(
$controller
)
)
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'The controller for URI "%s" is not callable: ',
$request
->
getPathInfo
(
)
)
.
$this
->
getControllerError
(
$controller
)
)
;
}
return
$controller
;
}
if
(
\
is_object
(
$controller
)
)
{
if
(
!\
is_callable
(
$controller
)
)
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'The controller for URI "%s" is not callable: ',
$request
->
getPathInfo
(
)
)
.
$this
->
getControllerError
(
$controller
)
)
;
}
return
$controller
;
}
$controller
[
0
]
=
$this
->
instantiateController
(
$controller
[
0
]
)
;
}
catch
(
\Error|\LogicException
$e
)
{
if
(
\
is_callable
(
$controller
)
)
{
return
$controller
;
}
throw
$e
;
}
}
if
(
!\
is_callable
(
$controller
)
)
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'The controller for URI "%s" is not callable: ',
$request
->
getPathInfo
(
)
)
.
$this
->
getControllerError
(
$controller
)
)
;
}
return
$controller
;
}
if
(
\
is_object
(
$controller
)
)
{
if
(
!\
is_callable
(
$controller
)
)
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'The controller for URI "%s" is not callable: ',
$request
->
getPathInfo
(
)
)
.
$this
->
getControllerError
(
$controller
)
)
;
}
return
$controller
;
}