Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getObscureValue example
if
(
is_object
(
$value
)
)
{
if
(
!
in_array
(
'__toString',
get_class_methods
(
$value
)
)
)
{
$value
=
get_class
(
$value
)
. ' object';
}
else
{
$value
=
$value
->
__toString
(
)
;
}
}
else
{
$value
=
implode
(
(array)
$value
)
;
}
if
(
$this
->
getObscureValue
(
)
)
{
$value
=
str_repeat
(
'*',
strlen
(
$value
)
)
;
}
$message
=
str_replace
(
'%value%',
$value
,
$message
)
;
foreach
(
$this
->_messageVariables
as
$ident
=>
$property
)
{
$message
=
str_replace
(
"%
$ident
%",
implode
(
' ',
(array)
$this
->
$property
)
,
$message
)
;
}