public function getPrescriber(bool $force = false)
    {
        if ($this->nb_prescriber == NULL ||
            $this->nb_prescriber->getId() != $this->getPrescriberId() ||
            $force
        ) {
            $nb_prescriber_id = $this->getPrescriberId();
            if ($nb_prescriber_id === null || $this->getCustomer() === null) {
                $this->nb_prescriber = null;
            } else {
                $this->nb_prescriber = $this->getCustomer()->getUser($nb_prescriber_id);
            }
        }

        return $this->nb_prescriber;
    }
public function getPrescriber(bool $force = false)
    {
        if ($this->nb_prescriber == NULL ||
            $this->nb_prescriber->getId() != $this->getPrescriberId() ||
            $force
        ) {
            $nb_prescriber_id = $this->getPrescriberId();
            if ($nb_prescriber_id === null || $this->getCustomer() === null) {
                $this->nb_prescriber = null;
            } else {
                $this->nb_prescriber = $this->getCustomer()->getUser($nb_prescriber_id);
            }
        }

        return $this->nb_prescriber;
    }
public function getPrescriber ( bool $ force = false ) { if ( $ this -> nb_prescriber == NULL || $ this -> nb_prescriber -> getId ( ) != $ this -> getPrescriberId ( ) || $ force ) { $ nb_prescriber_id = $ this -> getPrescriberId ( ) ; if ( $ nb_prescriber_id === null || $ this -> getCustomer ( ) === null ) { $ this -> nb_prescriber = null ; } else { $ this -> nb_prescriber = $ this -> getCustomer ( ) -> getUser ( $ nb_prescriber_id ) ; } } return $ this -> nb_prescriber ; }
Gets the Prescriber instance.
@param bool $force If true forces to reload object from the database.
@return CNabuUser|null Returns the Prescriber instance if exists or null if not.
Gets the Prescriber instance .