private function resolveTo($to, $from)
    {
        if (is_string($to)) {
            $to = strtolower($to);
        }

        if ($to === 'down') {
            $to = $this->versionCollection->getPreviousVersion($from);
        }

        if ($to === 'up') {
            $to = $this->versionCollection->getNextVersion($from);
        }

        if ($to === 'bottom') {
            $to = 0;
        }

        if ($to === 'top' || null === $to) {
            $to = $this->versionCollection->getLatestVersion();
        }

        if (0 !== $to && false === strtotime($to)) {
            throw new MigratorException(sprintf(
                'Unknown migration action "%s". Known actions: "%s"',
                $to,
                implode('", "', $this->actions)
            ));
        }

        if (0 !== $to && !$this->versionCollection->has($to)) {
            throw new MigratorException(sprintf(
                'Unknown version "%s"', $to
            ));
        }

        return $to;
    }
private function resolveTo($to, $from)
    {
        if (is_string($to)) {
            $to = strtolower($to);
        }

        if ($to === 'down') {
            $to = $this->versionCollection->getPreviousVersion($from);
        }

        if ($to === 'up') {
            $to = $this->versionCollection->getNextVersion($from);
        }

        if ($to === 'bottom') {
            $to = 0;
        }

        if ($to === 'top' || null === $to) {
            $to = $this->versionCollection->getLatestVersion();
        }

        if (0 !== $to && false === strtotime($to)) {
            throw new MigratorException(sprintf(
                'Unknown migration action "%s". Known actions: "%s"',
                $to,
                implode('", "', $this->actions)
            ));
        }

        if (0 !== $to && !$this->versionCollection->has($to)) {
            throw new MigratorException(sprintf(
                'Unknown version "%s"', $to
            ));
        }

        return $to;
    }
private function resolveTo ( $ to , $ from ) { if ( is_string ( $ to ) ) { $ to = strtolower ( $ to ) ; } if ( $ to === 'down' ) { $ to = $ this -> versionCollection -> getPreviousVersion ( $ from ) ; } if ( $ to === 'up' ) { $ to = $ this -> versionCollection -> getNextVersion ( $ from ) ; } if ( $ to === 'bottom' ) { $ to = 0 ; } if ( $ to === 'top' || null === $ to ) { $ to = $ this -> versionCollection -> getLatestVersion ( ) ; } if ( 0 !== $ to && false === strtotime ( $ to ) ) { throw new MigratorException ( sprintf ( 'Unknown migration action "%s". Known actions: "%s"' , $ to , implode ( '", "' , $ this -> actions ) ) ) ; } if ( 0 !== $ to && ! $ this -> versionCollection -> has ( $ to ) ) { throw new MigratorException ( sprintf ( 'Unknown version "%s"' , $ to ) ) ; } return $ to ; }
Resolve the "to" version.

@param string $to
@param string $from

@return string
Resolve the to version .