public static function parseDirection(string $dirStr): int
    {
        switch (strtolower($dirStr)) {
            case 'serialization':
                return GraphNavigatorInterface::DIRECTION_SERIALIZATION;

            case 'deserialization':
                return GraphNavigatorInterface::DIRECTION_DESERIALIZATION;

            default:
                throw new InvalidArgumentException(sprintf('The direction "%s" does not exist.', $dirStr));
        }
    }
public static function parseDirection(string $dirStr): int
    {
        switch (strtolower($dirStr)) {
            case 'serialization':
                return GraphNavigatorInterface::DIRECTION_SERIALIZATION;

            case 'deserialization':
                return GraphNavigatorInterface::DIRECTION_DESERIALIZATION;

            default:
                throw new InvalidArgumentException(sprintf('The direction "%s" does not exist.', $dirStr));
        }
    }
public static function parseDirection ( string $ dirStr ) : int { switch ( strtolower ( $ dirStr ) ) { case 'serialization' : return GraphNavigatorInterface :: DIRECTION_SERIALIZATION ; case 'deserialization' : return GraphNavigatorInterface :: DIRECTION_DESERIALIZATION ; default : throw new InvalidArgumentException ( sprintf ( 'The direction "%s" does not exist.' , $ dirStr ) ) ; } }
Parses a direction string to one of the direction constants.
Parses a direction string to one of the direction constants .