Sometimes the parsing and analysis process of PHP_Depend can consume a lot of time to finish, so I always put the shell aside and do something different. Normally I take a look at the shell every few minutes to check if the process has finished, but it also happens that I totally forget that I have started a PHP_Depend process on my system. So I need something that says to me, "Hey, mapi PHP_Depend has finished its job...", and here comes D-BUS in the game.
With D-BUS it is really simple to send a message to a desktop notification panel, as it is available for desktop environments like Gnome or KDE. To use D-BUS in your php applications you must checkout the source code of pecl/dbus from the svn repository and compile it for your php installation.
mapi@arwen ~ $ svn co http://svn.php.net/repository/pecl/dbus/trunk \
mapi@arwen ~ $ cd pecl-dbus
mapi@arwen pecl-dbus $ phpize
mapi@arwen pecl-dbus $ ./configure
mapi@arwen pecl-dbus $ make
mapi@arwen pecl-dbus $ sudo make install
That's it. Now you should see the --notify-me option when you open PHP_Depend's help screen.
mapi@arwen ~ $ ~/pdepend/pdepend.php --help
PHP_Depend @package_version@ by Manuel Pichler
// ... snipp ...
--debug Prints debugging information.
--help Print this help text.
--version Print the current version.
--notify-me Show a notification after analysis.
-d key[=value] Sets a php.ini value.
Now you can add this option to your normal PHP_Depend command and it will show a notification window with the number of analyzed files and the time the process took.