protected function dispatchPostEvents($uploaded, ResponseInterface $response, Request $request)
    {
        $dispatcher = $this->container->get('event_dispatcher');

        // dispatch post upload event (both the specific and the general)
        $postUploadEvent = new PostUploadEvent($uploaded, $response, $request, $this->type, $this->config);
        $dispatcher->dispatch(UploadEvents::POST_UPLOAD, $postUploadEvent);
        $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::POST_UPLOAD, $this->type), $postUploadEvent);

        if (!$this->config['use_orphanage']) {
            // dispatch post persist event (both the specific and the general)
            $postPersistEvent = new PostPersistEvent($uploaded, $response, $request, $this->type, $this->config);
            $dispatcher->dispatch(UploadEvents::POST_PERSIST, $postPersistEvent);
            $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::POST_PERSIST, $this->type), $postPersistEvent);
        }
    }
protected function dispatchPostEvents($uploaded, ResponseInterface $response, Request $request)
    {
        $dispatcher = $this->container->get('event_dispatcher');

        // dispatch post upload event (both the specific and the general)
        $postUploadEvent = new PostUploadEvent($uploaded, $response, $request, $this->type, $this->config);
        $dispatcher->dispatch(UploadEvents::POST_UPLOAD, $postUploadEvent);
        $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::POST_UPLOAD, $this->type), $postUploadEvent);

        if (!$this->config['use_orphanage']) {
            // dispatch post persist event (both the specific and the general)
            $postPersistEvent = new PostPersistEvent($uploaded, $response, $request, $this->type, $this->config);
            $dispatcher->dispatch(UploadEvents::POST_PERSIST, $postPersistEvent);
            $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::POST_PERSIST, $this->type), $postPersistEvent);
        }
    }
protected function dispatchPostEvents ( $ uploaded , ResponseInterface $ response , Request $ request ) { $ dispatcher = $ this -> container -> get ( 'event_dispatcher' ) ; // dispatch post upload event (both the specific and the general) $ postUploadEvent = new PostUploadEvent ( $ uploaded , $ response , $ request , $ this -> type , $ this -> config ) ; $ dispatcher -> dispatch ( UploadEvents :: POST_UPLOAD , $ postUploadEvent ) ; $ dispatcher -> dispatch ( sprintf ( '%s.%s' , UploadEvents :: POST_UPLOAD , $ this -> type ) , $ postUploadEvent ) ; if ( ! $ this -> config [ 'use_orphanage' ] ) { // dispatch post persist event (both the specific and the general) $ postPersistEvent = new PostPersistEvent ( $ uploaded , $ response , $ request , $ this -> type , $ this -> config ) ; $ dispatcher -> dispatch ( UploadEvents :: POST_PERSIST , $ postPersistEvent ) ; $ dispatcher -> dispatch ( sprintf ( '%s.%s' , UploadEvents :: POST_PERSIST , $ this -> type ) , $ postPersistEvent ) ; } }
This function is a helper function which dispatches post upload
and post persist events.

@param mixed $uploaded the uploaded file
@param ResponseInterface $response a response object
@param Request $request the request object
This function is a helper function which dispatches post upload and post persist events .