protected function emitProgress($progress, $step=0, $totalSteps=1, $stepName='')
    {

        if (!$progress instanceof Progress) {
            $progress =  new Progress($progress, $step, $totalSteps, $stepName);
        }

        foreach ($this->progressListeners as $listener) {
            call_user_func($listener, $progress);
        }
    }
protected function emitProgress($progress, $step=0, $totalSteps=1, $stepName='')
    {

        if (!$progress instanceof Progress) {
            $progress =  new Progress($progress, $step, $totalSteps, $stepName);
        }

        foreach ($this->progressListeners as $listener) {
            call_user_func($listener, $progress);
        }
    }
protected function emitProgress ( $ progress , $ step = 0 , $ totalSteps = 1 , $ stepName = '' ) { if ( ! $ progress instanceof Progress ) { $ progress = new Progress ( $ progress , $ step , $ totalSteps , $ stepName ) ; } foreach ( $ this -> progressListeners as $ listener ) { call_user_func ( $ listener , $ progress ) ; } }
Emit a progress object to all listeners.

@param Progress|int $progress
@param int    $step       (default:0)
@param int    $totalSteps (default:1)
@param string $stepName   (optional)
Emit a progress object to all listeners .