Show all projects!

Class Middleware - File Templates in PHPStorm verwenden

<?php
#parse("PHP File Header.php")
 
 
#if (${NAMESPACE})
namespace ${NAMESPACE};
 
#end
 
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
 
#set ($CLASSNAME = $NAME.replace('Factory', ''))
 
final class ${NAME} {
    public function __invoke(ContainerInterface ${DS}container): $CLASSNAME
    {
        ${DS}logger = ${DS}container->get(LoggerInterface::class);
         
        return new $CLASSNAME(${DS}logger);
    }
}

Article relase date: / Last update: