This step by step explains how to create an URI protocol (a scheme) to directly edit a file in Sublime Text from browser (or from the terminal), and mostly from notifications of the PHP-Console extension.
Launch AppleScript and export the open_editor.scpt script as an Application (name it "Sublime Text URL Launcher").
in the application you just created and add the next lines
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Sublime Text URL Launcher</string>
<key>CFBundleURLSchemes</key>
<array>
<string>editor</string>
</array>
</dict>
</array>
<key>LSUIElement</key>
<string>1</string>
<key>LSBackgroundOnly</key>
<string>1</string>