<?phpnamespace CoreBundle\Entity\Vehicles;use Doctrine\Common\Collections\ArrayCollection;use Application\Sonata\MediaBundle\Entity\Media;use Doctrine\Common\Collections\Collection;/** * Specification */class Specification{    /**     * @var integer     */    private $id;    /**     * @var integer     */    private $temp_id;    /**     * @var string     */    private $title_ru;    /**     * @var string     */    private $title_ua;    /**     * @var Vehicle     */    private $vehicle;    /**     * @var Media     */    private $image;    /**     * @var Collection     */    private $options;    /**     * Constructor     */    public function __construct()    {        $this->options = new ArrayCollection();    }    /**     * Get id     *     * @return integer     */    public function getId()    {        return $this->id;    }    /**     * Set tempId     *     * @param integer $tempId     *     * @return Specification     */    public function setTempId($tempId)    {        $this->temp_id = $tempId;        return $this;    }    /**     * Get tempId     *     * @return integer     */    public function getTempId()    {        return $this->temp_id;    }    /**     * Set titleRu     *     * @param string $titleRu     *     * @return Specification     */    public function setTitleRu($titleRu)    {        $this->title_ru = $titleRu;        return $this;    }    /**     * Get titleRu     *     * @return string     */    public function getTitleRu()    {        return $this->title_ru;    }    /**     * Set titleUa     *     * @param string $titleUa     *     * @return Specification     */    public function setTitleUa($titleUa)    {        $this->title_ua = $titleUa;        return $this;    }    /**     * Get titleUa     *     * @return string     */    public function getTitleUa()    {        return $this->title_ua;    }    public function getTitle($locale)    {        return $locale == 'ru' ? $this->getTitleRu() : $this->getTitleUa();    }    /**     * Set vehicle     *     * @param Vehicle $vehicle     *     * @return Specification     */    public function setVehicle(Vehicle $vehicle = null)    {        $this->vehicle = $vehicle;        return $this;    }    /**     * Get vehicle     *     * @return Vehicle     */    public function getVehicle()    {        return $this->vehicle;    }    /**     * Set image     *     * @param Media $image     *     * @return Specification     */    public function setImage(Media $image = null)    {        $this->image = $image;        return $this;    }    /**     * Get image     *     * @return Media     */    public function getImage()    {        return $this->image;    }    /**     * Add option     *     * @param SpecificationOptions $option     *     * @return Specification     */    public function addOption(SpecificationOptions $option)    {        $this->options[] = $option;        return $this;    }    /**     * Remove option     *     * @param SpecificationOptions $option     */    public function removeOption(SpecificationOptions $option)    {        $this->options->removeElement($option);    }    /**     * Get options     *     * @return Collection     */    public function getOptions()    {        return $this->options;    }    public function __toString()    {        return (string) $this->getTitleRu();    }}