protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
    {
        $results = [];

        foreach ($callbacksPerType as $type => $callbacks) {
            if ($type === $abstract || $object instanceof $type) {
                $results = array_merge($results, $callbacks);
            }
        }

        return $results;
    }
protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
    {
        $results = [];

        foreach ($callbacksPerType as $type => $callbacks) {
            if ($type === $abstract || $object instanceof $type) {
                $results = array_merge($results, $callbacks);
            }
        }

        return $results;
    }
protected function getCallbacksForType ( $ abstract , $ object , array $ callbacksPerType ) { $ results = [ ] ; foreach ( $ callbacksPerType as $ type => $ callbacks ) { if ( $ type === $ abstract || $ object instanceof $ type ) { $ results = array_merge ( $ results , $ callbacks ) ; } } return $ results ; }
Get all callbacks for a given type.

@param  string  $abstract
@param  object  $object
@param  array   $callbacksPerType

@return array
Get all callbacks for a given type .