Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
generateService example
if
(
$entity
instanceof MappingEntityDefinition
)
{
continue
;
}
$classes
[
$this
->
getFile
(
$entity
)
]
=
$this
->
generate
(
$entity
)
;
$content
=
$this
->
updateDefinition
(
$entity
)
;
if
(
$content
!== null
)
{
$classes
[
$this
->
getDefinitionFile
(
$entity
)
]
=
$content
;
}
$services
[
]
=
$this
->
generateService
(
$entity
)
;
}
$io
->
success
(
'Created schema in ' .
$this
->dir
)
;
foreach
(
$classes
as
$file
=>
$content
)
{
$file
=
rtrim
(
$this
->dir, '/'
)
. '/' .
$file
;
try
{
file_put_contents
(
$file
,
$content
)
;
}
catch
(
\Throwable
$e
)
{
$output
->
writeln
(
$e
->
getMessage
(
)
)
;
}
}