eZ\Publish\Core\REST\Client\Input\Parser\VersionInfo::convertVersionStatus PHP Method

convertVersionStatus() protected method

Converts the given $statusString to its constant representation.
protected convertVersionStatus ( string $statusString ) : integer
$statusString string
return integer
    protected function convertVersionStatus($statusString)
    {
        switch (strtoupper($statusString)) {
            case 'PUBLISHED':
                return Values\Content\VersionInfo::STATUS_PUBLISHED;
            case 'DRAFT':
                return Values\Content\VersionInfo::STATUS_DRAFT;
            case 'ARCHIVED':
                return Values\Content\VersionInfo::STATUS_ARCHIVED;
        }
        throw new \RuntimeException(sprintf('Unknown version status: "%s"', $statusString));
    }