public function onResolving(Closure $callback, $priority = 0)
    {
        if (!isset($this->callbacks[$priority])) {

            $this->callbacks[$priority] = array();

        }
        $this->callbacks[$priority][] = $callback;
    }
public function onResolving(Closure $callback, $priority = 0)
    {
        if (!isset($this->callbacks[$priority])) {

            $this->callbacks[$priority] = array();

        }
        $this->callbacks[$priority][] = $callback;
    }
public function onResolving ( Closure $ callback , $ priority = 0 ) { if ( ! isset ( $ this -> callbacks [ $ priority ] ) ) { $ this -> callbacks [ $ priority ] = array ( ) ; } $ this -> callbacks [ $ priority ] [ ] = $ callback ; }
Register a listener for the resolving event.
This is only fired on the main resolve, not internal dependency resolves.

NOTE: The high priorities are getting fired LAST, while negative (lower)
are getting fired FIRST.

<strong>Reserved priorities</strong>
- -255 Injector Method Detection (this should fire as the first callback.)

@param  Closure $callback The listener
@param  int     $priority The priortiy of the listener
Register a listener for the resolving event . This is only fired on the main resolve not internal dependency resolves .