<?php

namespace Comitium5\DesignerBundle\Factory\Site;

use Comitium5\DesignerBundle\Entity\Site;
use Comitium5\DesignerBundle\Factory\NormalizerFactoryInterface;

/**
 * Class SiteFactory
 *
 * @author Carles Gómez <carles@bab-soft.com>
 * @package Comitium5\DesignerBundle\Factory\Site
 */
class SiteFactory implements NormalizerFactoryInterface
{
    /**
     * @param array $site
     *
     * @return Site
     */
    public function create(array $site)
    {
        $entity = new Site();

        $entity
            ->setId($site["id"])
            ->setPrefix($site["prefix"])
        ;

        return $entity;
    }
}
