public function legacyTransition(DeliveryExecution $deliveryExecution, $state)
    {
        switch ($state) {
            case DeliveryExecution::STATE_FINISHED:
                $result = $this->finish($deliveryExecution);
                break;
            case DeliveryExecution::STATE_ACTIVE:
                $result = $this->run($deliveryExecution);
                break;
            case DeliveryExecution::STATE_PAUSED:
                $result = $this->pause($deliveryExecution);
                break;
            default:
                $this->logWarning('Unrecognised state '.$state);
                $result = $this->setState($deliveryExecution, $state);
        }
        return $result;
    }
public function legacyTransition(DeliveryExecution $deliveryExecution, $state)
    {
        switch ($state) {
            case DeliveryExecution::STATE_FINISHED:
                $result = $this->finish($deliveryExecution);
                break;
            case DeliveryExecution::STATE_ACTIVE:
                $result = $this->run($deliveryExecution);
                break;
            case DeliveryExecution::STATE_PAUSED:
                $result = $this->pause($deliveryExecution);
                break;
            default:
                $this->logWarning('Unrecognised state '.$state);
                $result = $this->setState($deliveryExecution, $state);
        }
        return $result;
    }
public function legacyTransition ( DeliveryExecution $ deliveryExecution , $ state ) { switch ( $ state ) { case DeliveryExecution :: STATE_FINISHED : $ result = $ this -> finish ( $ deliveryExecution ) ; break ; case DeliveryExecution :: STATE_ACTIVE : $ result = $ this -> run ( $ deliveryExecution ) ; break ; case DeliveryExecution :: STATE_PAUSED : $ result = $ this -> pause ( $ deliveryExecution ) ; break ; default : $ this -> logWarning ( 'Unrecognised state ' . $ state ) ; $ result = $ this -> setState ( $ deliveryExecution , $ state ) ; } return $ result ; }
Legacy function to ensure all calls to setState use
the correct transition instead

@param DeliveryExecution $deliveryExecution
@param string $state
@return bool
@throws \common_exception_NotFound
Legacy function to ensure all calls to setState use the correct transition instead