Ingo_Rule_Addresses::addAddresses PHP Method

addAddresses() public method

Add addresses to the current address list.
public addAddresses ( $to_add )
    public function addAddresses($to_add)
    {
        global $injector;
        $addr = clone $this->_addr;
        $addr->add($to_add);
        $addr->unique();
        $max = is_null($this->_perm) ? false : $injector->getInstance('Horde_Core_Perms')->hasAppPermission(Ingo_Perms::getPerm($this->_perm));
        if ($max !== true && !empty($max)) {
            $addr_count = count($addr);
            if ($addr_count > $max) {
                throw $this->_setAddressesException($addr_count, $max);
            }
        }
        $this->_addr = $addr;
    }