public function addCustomer(Customer $l)
    {
        if ($this->collCustomers === null) {
            $this->initCustomers();
            $this->collCustomersPartial = true;
        }

        if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddCustomer($l);

            if ($this->customersScheduledForDeletion and $this->customersScheduledForDeletion->contains($l)) {
                $this->customersScheduledForDeletion->remove($this->customersScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
public function addCustomer(Customer $l)
    {
        if ($this->collCustomers === null) {
            $this->initCustomers();
            $this->collCustomersPartial = true;
        }

        if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddCustomer($l);

            if ($this->customersScheduledForDeletion and $this->customersScheduledForDeletion->contains($l)) {
                $this->customersScheduledForDeletion->remove($this->customersScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
public function addCustomer ( Customer $ l ) { if ( $ this -> collCustomers === null ) { $ this -> initCustomers ( ) ; $ this -> collCustomersPartial = true ; } if ( ! in_array ( $ l , $ this -> collCustomers -> getArrayCopy ( ) , true ) ) { // only add it if the **same** object is not already associated $ this -> doAddCustomer ( $ l ) ; if ( $ this -> customersScheduledForDeletion and $ this -> customersScheduledForDeletion -> contains ( $ l ) ) { $ this -> customersScheduledForDeletion -> remove ( $ this -> customersScheduledForDeletion -> search ( $ l ) ) ; } } return $ this ; }
Method called to associate a Customer object to this object
through the Customer foreign key attribute.

@param    Customer $l Customer
@return Country The current object (for fluent API support)
Method called to associate a Customer object to this object through the Customer foreign key attribute .