/** * Set feature * * @param VIB\Bundle\BioBundle\Entity\DNA\Abstracts\Feature $feature * @param boolean $recurse */ public function setFeature(Feature $feature, $recurse = true) { if ($recurse === true) { if ($feature != null) { $feature->addLocation($this, false); } elseif ($this->feature != null) { $this->feature->removeLocation($this, false); } } $this->feature = $feature; }