public function setCustomer(CNabuCustomer $nb_customer, $field = NABU_CUSTOMER_FIELD_ID)
    {
        $this->nb_customer = $nb_customer;
        if ($this instanceof CNabuDataObject) {
            if ($nb_customer !== null) {
                $this->transferValue($nb_customer, NABU_CUSTOMER_FIELD_ID, $field);
            } else {
                $this->setValue(NABU_CUSTOMER_FIELD_ID, null);
            }
        }

        return $this;
    }
public function setCustomer(CNabuCustomer $nb_customer, $field = NABU_CUSTOMER_FIELD_ID)
    {
        $this->nb_customer = $nb_customer;
        if ($this instanceof CNabuDataObject) {
            if ($nb_customer !== null) {
                $this->transferValue($nb_customer, NABU_CUSTOMER_FIELD_ID, $field);
            } else {
                $this->setValue(NABU_CUSTOMER_FIELD_ID, null);
            }
        }

        return $this;
    }
public function setCustomer ( CNabuCustomer $ nb_customer , $ field = NABU_CUSTOMER_FIELD_ID ) { $ this -> nb_customer = $ nb_customer ; if ( $ this instanceof CNabuDataObject ) { if ( $ nb_customer !== null ) { $ this -> transferValue ( $ nb_customer , NABU_CUSTOMER_FIELD_ID , $ field ) ; } else { $ this -> setValue ( NABU_CUSTOMER_FIELD_ID , null ) ; } } return $ this ; }
Sets the customer instance that owns this object and sets the field containing the customer id.
@param CNabuCustomer $nb_customer Customer instance to be setted.
@param string $field Field name where the customer id will be stored.
@return CNabuDataObject Returns $this to allow the cascade chain of setters.
Sets the customer instance that owns this object and sets the field containing the customer id .