Added VKBot
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Library\VK\Mapper\Strategy;
|
||||
|
||||
use App\Library\VK\Mapper\AttachmentMapper;
|
||||
use App\Library\VK\Mapper\Strategy\Interfaces\MappingStrategyInterface;
|
||||
|
||||
class MappingStrategyFactory
|
||||
{
|
||||
public function __construct(private AttachmentMapper $attachmentMapper) {}
|
||||
|
||||
public function getStrategy(bool $isRepost): MappingStrategyInterface
|
||||
{
|
||||
return $isRepost
|
||||
? new RepostStrategy($this->attachmentMapper)
|
||||
: new SimplePostStrategy($this->attachmentMapper);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user