mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-21 07:11:16 +02:00
18 lines
312 B
PHP
18 lines
312 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);
|
|
}
|
|
}
|