/** * @param AutoFeature $feature */ public function addFeature(AutoFeature $feature) { if ($this->features === NULL) { $this->features = array(); } $this->features[$feature->getId()] = $feature; }