23 lines
540 B
PHP
23 lines
540 B
PHP
<?php
|
|
|
|
namespace Modules\Objects;
|
|
|
|
use Src\Common\Interfaces\Dto\Object\IFactory;
|
|
use Src\Common\Dto\Object\Factory as Base;
|
|
use Src\Common\Dto\Object\AbstractObject;
|
|
|
|
class Factory extends Base implements IFactory
|
|
{
|
|
|
|
public function createObjectField(string $type): ?AbstractObject
|
|
{
|
|
if ($type == MainInfo::TYPE) {
|
|
$object = new MainInfo();
|
|
$object->setFieldsFactory($this);
|
|
$object->init();
|
|
return $object;
|
|
}
|
|
return parent::createObjectField($type);
|
|
}
|
|
}
|