public function addToPackage(PackageInterface $package) { $this->package = $package; if ($package->hasProduct()) { $package->addProduct($this); } return $this; }
public function addPackage(PackageInterface $package) { $this->packages[$package->getId()] = $package; return $this; }