<?php

namespace AppBundle\Service\Crud\Strategy;

/**
 * @author Alexandr Sibov<cyberdelia1987@gmail.com>
 */
trait ResolverAwareTrait
{
    /**
     * @var ResolverInterface
     */
    private $resolver;

    public function setStrategyResolver(ResolverInterface $resolver)
    {
        $this->resolver = $resolver;

        $resolver->setBaseEntityName($this->getBaseEntityName());
        $resolver->setEntityFactory($this);
    }

    /**
     * @return ResolverInterface
     */
    public function getStrategyResolver()
    {
        return $this->resolver;
    }
}
