|
com_event_sink
Connect events from a COM object to a PHP object
(PHP 4 >= 4.2.0, PHP 5)
Example 410. COM event sink example<?php Code Examples / Notes » com_event_sinkfjortiz
In case someone needs a skeleton sink for ADODB.Connection events: class ADOConnectionEventSink { function BeginTransComplete( $translevel, $objerror, $status, $objconn ) { return 0; } function CommitTransComplete( $objerror, $status, $objconn ) { return 0; } function RolbackTransComplete( $objerror, $status, $objconn ) { return 0; } function WillConnect ( $ConnectionString, $userid, $psword, $options, $status, $objconn ) { return 0; } function ConnectComplete ( $objerror, $status, $objconn) { return 0; } function Disconnect( $status, $objConn ) { return 0; } function WillExecute ( $src, $cursortyp, $locktyp, $options, $status, $objcomm, $objrs, $objconn ) { return 0; } function ExecuteComplete ( $recaffected, $objerror, $status, $objcomm, $objrs, $objconn ) { return 0; } function InfoMessage ( $objerror, $status, $objconn) { return 0; } } // later on... $db = new COM("ADODB.Connection", NULL, $charPage); $sink = new ADOConnectionEventSink(); com_event_sink($db, $sink, "ConnectionEvents"); //... |
Change LanguageCOM DOTNET VARIANT com_addref com_create_guid com_event_sink com_get_active_object com_get com_invoke com_isenum com_load_typelib com_load com_message_pump com_print_typeinfo com_propget com_propput com_propset com_release com_set variant_abs variant_add variant_and variant_cast variant_cat variant_cmp variant_date_from_timestamp variant_date_to_timestamp variant_div variant_eqv variant_fix variant_get_type variant_idiv variant_imp variant_int variant_mod variant_mul variant_neg variant_not variant_or variant_pow variant_round variant_set_type variant_set variant_sub variant_xor |