Common/Listener/AbstractNotifyListener.php
protected function didStateChangeTo($resource, $state)
    {
        if (empty($stateCs = $this->tracker->getChangeSet($resource, 'state'))) {
            return false;
        }

        if ($stateCs[1] === $state && $stateCs[0] !== $state) {
            return true;
        }

        return false;
    }
protected function didStateChangeTo($resource, $state)
    {
        if (empty($stateCs = $this->tracker->getChangeSet($resource, 'state'))) {
            return false;
        }

        if ($stateCs[1] === $state && $stateCs[0] !== $state) {
            return true;
        }

        return false;
    }
protected function didStateChangeTo ( $ resource , $ state ) { if ( empty ( $ stateCs = $ this -> tracker -> getChangeSet ( $ resource , 'state' ) ) ) { return false ; } if ( $ stateCs [ 1 ] === $ state && $ stateCs [ 0 ] !== $ state ) { return true ; } return false ; }
Returns whether the state of the given resource changed to the given state.

@param object $resource
@param string $state

@return bool
Returns whether the state of the given resource changed to the given state .