mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-24 16:51:19 +02:00
16 lines
311 B
PHP
16 lines
311 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Creational\FactoryMethod;
|
|
|
|
class FileLoggerFactory implements LoggerFactory
|
|
{
|
|
public function __construct(private string $filePath)
|
|
{
|
|
}
|
|
|
|
public function createLogger(): Logger
|
|
{
|
|
return new FileLogger($this->filePath);
|
|
}
|
|
}
|