public function delete($address_id, $check = true)
    {
        $result = null;
        $this->hook->attach('address.delete.before', $address_id, $check, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if ($check && !$this->canDelete($address_id)) {
            return false;
        }

        $result = (bool) $this->db->delete('address', array('address_id' => $address_id));
        $this->hook->attach('address.delete.after', $address_id, $check, $result, $this);
        return (bool) $result;
    }
public function delete($address_id, $check = true)
    {
        $result = null;
        $this->hook->attach('address.delete.before', $address_id, $check, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if ($check && !$this->canDelete($address_id)) {
            return false;
        }

        $result = (bool) $this->db->delete('address', array('address_id' => $address_id));
        $this->hook->attach('address.delete.after', $address_id, $check, $result, $this);
        return (bool) $result;
    }
public function delete ( $ address_id , $ check = true ) { $ result = null ; $ this -> hook -> attach ( 'address.delete.before' , $ address_id , $ check , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } if ( $ check && ! $ this -> canDelete ( $ address_id ) ) { return false ; } $ result = ( bool ) $ this -> db -> delete ( 'address' , array ( 'address_id' => $ address_id ) ) ; $ this -> hook -> attach ( 'address.delete.after' , $ address_id , $ check , $ result , $ this ) ; return ( bool ) $ result ; }
Deletes an address
@param integer $address_id
@param bool $check
@return boolean
Deletes an address