IMP_Prefs_Identity::getFromLine PHP Méthode

getFromLine() public méthode

Returns a complete From: header based on all relevant factors (fullname, from address, input fields, locks etc.)
public getFromLine ( integer $ident = null, string $from_address = '' ) : Horde_Mail_Rfc822_Address
$ident integer The identity to retrieve the values from.
$from_address string A default from address to use if no identity is selected and the from_addr preference is locked.
Résultat Horde_Mail_Rfc822_Address The address to use for From header.
    public function getFromLine($ident = null, $from_address = '')
    {
        $address = is_null($ident) ? $from_address : null;
        if (empty($address) || $this->_prefs->isLocked($this->_prefnames['from_addr'])) {
            return $this->getFromAddress($ident);
        }
        $result = IMP::parseAddressList($address);
        return $result[0];
    }