The main expected use is like this, for figuring out what methods
are allowed for a COM object:
$ie = new COM("InternetExplorer.Application");
// Prints class definition for IE object
com_print_typeinfo($ie, "InternetExplorer.Application", false);
// Prints class definition for default IE event handler
com_print_typeinfo($ie, "InternetExplorer.Application", true);
rather than longs.
- Make the IDispatch implementation a bit more generic (and
fix my mess of pointers).
- Add new com_message_pump() function that acts like an interruptible
usleep() that processes COM calls/events.
- Add new com_print_typeinfo() function for "decompiling" the typeinfo
for an interface into PHP script. This is useful for generating a
skeleton for use as an event sink.
- Add new com_event_sink() function for sinking events from COM
objects. Usage is like this:
<?php
class IEEventSinker {
var $terminated = false;
function ProgressChange($progress, $progressmax) {
echo "Download progress: $progress / $progressmax\n";
}
function DocumentComplete(&$dom, $url) {
echo "Document $url complete\n";
}
function OnQuit() {
echo "Quit!\n";
$this->terminated = true;
}
}
$ie = new COM("InternetExplorer.Application");
$sink =& new IEEventSinker();
com_event_sink($ie, $sink, "DWebBrowserEvents2");
$ie->Visible = true;
$ie->Navigate("http://www.php.net");
while(!$sink->terminated) {
com_message_pump(4000);
}
$ie = null;
?>
do "pear help shortcuts" to see what shortcuts exist
* renamed "list-installed" command to "list" and made it able to
list the contents of installed packages as well as tar/tgz/xml files
* added some more/better command docs
* fixed up the synopsis part in the help output
* display option parameters (--foo=bar, where bar is specified in
'shortarg' as for example 'f:bar')
* renamed list-remote-packages to list-remote
* renamed remote-package-info to remote-info