I know my car doesn't lock or unlock in relation to putting the car in park.
But let me get it clear what you want:
Condition:
Parking Brake Up --> Car Doors Unlock (For getting out of the car)
Parking Brake Down --> Car Door Lock (For driving)
This is probably easy.
First locate a signal wire that can lock/unlock all the doors.
The easiest place to find this in relation to the e-brake is probably at the door lock control module. (I will PM you the link)
-or- you can trace the wire running from your door lock button.
To unlock the door, this wire is simply shorted to ground.
To lock the door, this wire is ran through a 1,000 Ohm resistor.
So to make the e-Brake work the door locks, you would use some metal contacts, spring switches, or optical switch.
Part of the ebrake is metal, and probably is grounded, so you can use that as a contact point.
To unlock the doors, simply put a signal contact that the ebrake will hit on it's way DOWN.
To lock the doors, simply put a contact, with a 1K resistor in series, that the ebrake will hit on it's way UP.
Make sure that the contact is momentary, or you will drain your battery.
(As the car would be contantly trying to lock/unlock)
If you can't figure out how to make the contact momentary, you can put a capacitor in line with the contact. (About 50uF or so)
The cap would prevent any large battery drain, and make a toggle contact into a momentary contact.
Get what I am saying yet?
I like the idea, as I drive with the doors locked.
I would probably wire a timer for myself so that the doors lock 30 seconds after I put down the brake.
Or mabye I could wire a switch so the doors lock when I press on the gas to a certain point. That way the doors lock when I am moving, rather then locking when I am getting ready to drive, and my wife may not be in the car yet.