* @license AGPL v3 * @link http://cweiske.de/linksys-wrt3g-tools.htm */ /** * Observer to catch debugging data from the HTTP request. * * @category Tools * @package linksys-wrt3g-tools * @author Christian Weiske * @license AGPL v3 * @link http://cweiske.de/linksys-wrt3g-tools.htm */ class Wrt3g_RequestObserver implements SplObserver { protected $wrt3g; /** * Create new instance * * @param Wrt3g $wrt3g Logger */ public function __construct(Wrt3g $wrt3g) { $this->wrt3g = $wrt3g; } /** * Receive notification from HTTP_Request2 * * @param SplSubject $subject The request object * * @return void */ public function update(SplSubject $subject) { $event = $subject->getLastEvent(); $this->wrt3g->log( 'event: ' . $event['name'] . "\n" . 'data: ' . $event['data'], 3 ); } } ?>