src/Shutdown.php
private function registerImpl(
    /*string*/ $id,
    callable $callback,
    /*int*/ $priority
  ) {
    // Initialize array for this priority.
    if(!isset($this->callbacks[$priority])) {
      $this->callbacks[$priority] = [];
    }

    // Keep a pointer to the callback and what priority it is.
    $this->priorities[$id] = $priority;
    $this->callbacks[$priority][$id] = $callback;
  }
private function registerImpl(
    /*string*/ $id,
    callable $callback,
    /*int*/ $priority
  ) {
    // Initialize array for this priority.
    if(!isset($this->callbacks[$priority])) {
      $this->callbacks[$priority] = [];
    }

    // Keep a pointer to the callback and what priority it is.
    $this->priorities[$id] = $priority;
    $this->callbacks[$priority][$id] = $callback;
  }
private function registerImpl ( /*string*/ $ id , callable $ callback , /*int*/ $ priority ) { // Initialize array for this priority. if ( ! isset ( $ this -> callbacks [ $ priority ] ) ) { $ this -> callbacks [ $ priority ] = [ ] ; } // Keep a pointer to the callback and what priority it is. $ this -> priorities [ $ id ] = $ priority ; $ this -> callbacks [ $ priority ] [ $ id ] = $ callback ; }
The actual registration implementation takes place here. If you extend this
class, you can register the callbacks using this method.

@param string $id unique identifier of this callback
@param callable $callback to register
@param int $priority of the callback
The actual registration implementation takes place here . If you extend this class you can register the callbacks using this method .