Replaced callable typehint with is_callable() check for php 5.3 compatibility.