<?php

namespace KupShop\ContentBundle\Entity\Wrapper;

use KupShop\ContentBundle\Entity\Photo;
use KupShop\KupShopBundle\Template\EntityWrapper;
use KupShop\KupShopBundle\Util\System\UrlFinder;

/**
 * Class PhotoWrapper.
 *
 * @property Photo object
 */
class PhotoWrapper extends EntityWrapper
{
    /**
     * @var UrlFinder
     */
    private $urlFinder;

    public function __construct(UrlFinder $urlFinder)
    {
        $this->urlFinder = $urlFinder;
    }

    protected static $objectType = Photo::class;

    public function getUrl($size)
    {
        return $this->urlFinder->shopUrl(getImagePath($this->object->getId(), $size));
    }
}
