Skip to content

Comments

added debug handler: ElasticSearch\Client::addOnCallHandler#33

Open
juzna wants to merge 1 commit intonervetattoo:masterfrom
juzna:feature/onCallHandler
Open

added debug handler: ElasticSearch\Client::addOnCallHandler#33
juzna wants to merge 1 commit intonervetattoo:masterfrom
juzna:feature/onCallHandler

Conversation

@juzna
Copy link

@juzna juzna commented Jun 4, 2013

It is possible to register a callback, which gets called every time a request to ElasticSearch is made.

It makes possible to create debug tools, such as this debug bar for Nette Fw.
debug bar example

It is possible to register a callback, which gets called every time a request to ElasticSearch is made.
@nervetattoo
Copy link
Owner

Thanks. I'd appreciate a few small changes before merging:

  1. Change the public $onCall to a protected $onCall = array(). I don't want this exposed
  2. Preferably add typehinting in the method for adding a listener
  3. I would prefer a method name like onCall
  4. Add some basic tests to prove its working

@juzna
Copy link
Author

juzna commented Jun 4, 2013

Hi Raymond, thanks for the feedback! I don't understand what you mean by the third step, can you please give me a better hint? Thx

@nervetattoo
Copy link
Owner

Just that I think a method named onCall(callable $handler) would be better than addOnCallHandler($handler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants