4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Serializer;
15 * SerializerAware trait.
17 * @author Joel Wurtz <joel.wurtz@gmail.com>
19 trait SerializerAwareTrait
22 * @var SerializerInterface
24 protected $serializer;
27 * Sets the serializer.
29 * @param SerializerInterface $serializer A SerializerInterface instance
31 public function setSerializer(SerializerInterface $serializer)
33 $this->serializer = $serializer;