fastbolt/entity-importer

View on GitHub
src/AbstractEntityImporterDefinition.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * Copyright © Fastbolt Schraubengroßhandels GmbH.
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Fastbolt\EntityImporter;

/**
 * @template T
 * @template-implements EntityImporterDefinition<T>
 */
abstract class AbstractEntityImporterDefinition implements EntityImporterDefinition
{
    /**
     * @inheritDoc
     */
    public function getName(): string
    {
        return '';
    }

    /**
     * @inheritDoc
     */
    public function getFieldConverters(): array
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function getEntityFactory(): ?callable
    {
        return null;
    }

    /**
     * @inheritDoc
     */
    public function getFlushInterval(): int
    {
        return 1000;
    }

    /**
     * @inheritDoc
     */
    public function getSkippedFields(): array
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function getEntityInstantiator(): ?callable
    {
        return null;
    }

    /**
     * @inheritDoc
     */
    public function getEntityModifier(): ?callable
    {
        return null;
    }

    /**
     * @inheritDoc
     */
    public function getFieldNameMapping(): array
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function getIdentifierModifier(): ?callable
    {
        return null;
    }

    /**
     * @inheritDoc
     */
    public function isThrowExceptionOnUnknownField(): bool
    {
        return true;
    }
}