http://php.net/language.types.html#language.pseudo-types "Thomas Hochstetter" <fisherofmen@xxxxxxx> wrote in message news:php.general-199028@xxxxxxxxxxxxxxx > Hi again, > > I have always been wondering how this is done properly: > > Here is an example: > > [snip] > class A { > function name( $a, $b, $c) { > $tmp = array(); > $tmp[a] = $a; > . > array_push( $GLOBALS['XMLStack'], $tmp ); > } > > function parse() { > .. some definitions . > $parser->set_handler( "root/page/title", "name" ); > . some more stuff here . > } > } > [/snip] > > What I want is to have the callback function name as it is in the above > example. But, obviously, the above code won't work. So, how do I tell the > set_handler function that it must use the name function from the class? > Using: > "A::name" or "$this->name" (if instantiated) . how do these callback > function calls work, because the same issue is with the xml handler > functions in php4 (have not as yet been to v5). > > Also, how can I get the data from the callback function out without using > $GLOBALS? I cannot just return an array, can I? > > Any ideas. > > Thanks so long. > > Thomas > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php