private function addAddressArray(array $address_array, $type)
    {
        foreach ($address_array as $address => $name) {

            if (!method_exists($this, $type)) {
                return false;
            }

            if (is_int($address)) {
                $this->$type($name);
            } else {
                $this->$type($address, $name);
            }
        }

        return true;
    }
private function addAddressArray(array $address_array, $type)
    {
        foreach ($address_array as $address => $name) {

            if (!method_exists($this, $type)) {
                return false;
            }

            if (is_int($address)) {
                $this->$type($name);
            } else {
                $this->$type($address, $name);
            }
        }

        return true;
    }
private function addAddressArray ( array $ address_array , $ type ) { foreach ( $ address_array as $ address => $ name ) { if ( ! method_exists ( $ this , $ type ) ) { return false ; } if ( is_int ( $ address ) ) { $ this -> $ type ( $ name ) ; } else { $ this -> $ type ( $ address , $ name ) ; } } return true ; }
Adds array of addresses to type

@param array $address_array
@param $type
@return bool
Adds array of addresses to type