src/Subjects/AbstractSubject.php
/**
     * Register the passed callback with the specific type.
     *
     * @param \TechDivision\Import\Callbacks\CallbackInterface $callback The subject to register the callbacks for
     * @param string                                           $type     The type to register the callback with
     *
     * @return void
     */
Register the passed callback with the specific type.
@param \TechDivision\Import\Callbacks\CallbackInterface $callback The subject to register the callbacks for
@param string                                           $type     The type to register the callback with

@return void
Register the passed callback with the specific type . @param \ TechDivision \ Import \ Callbacks \ CallbackInterface $callback The subject to register the callbacks for @param string $type The type to register the callback with @return void
public function registerCallback(CallbackInterface $callback, $type)
    {
        if (!isset($this->callbacks[$type])) {
            $this->callbacks[$type] = array();
        }
        $this->callbacks[$type][] = $callback;
    }
public function registerCallback ( CallbackInterface $ callback , $ type ) { if ( ! isset ( $ this -> callbacks [ $ type ] ) ) { $ this -> callbacks [ $ type ] = array ( ) ; } $ this -> callbacks [ $ type ] [ ] = $ callback ; }
Register the passed callback with the specific type.
Register the passed callback with the specific type .
// query whether or not the array with the callbacks for the // passed type has already been initialized, or not // append the callback with the instance of the passed type