src/LocalTime.php
public static function parse(string $text, DateTimeParser $parser = null) : LocalTime
    {
        if (! $parser) {
            $parser = IsoParsers::localTime();
        }

        return LocalTime::from($parser->parse($text));
    }
public static function parse(string $text, DateTimeParser $parser = null) : LocalTime
    {
        if (! $parser) {
            $parser = IsoParsers::localTime();
        }

        return LocalTime::from($parser->parse($text));
    }
public static function parse ( string $ text , DateTimeParser $ parser = null ) : LocalTime { if ( ! $ parser ) { $ parser = IsoParsers :: localTime ( ) ; } return LocalTime :: from ( $ parser -> parse ( $ text ) ) ; }
Obtains an instance of `LocalTime` from a text string.

@param string              $text   The text to parse, such as `10:15`.
@param DateTimeParser|null $parser The parser to use, defaults to the ISO 8601 parser.

@return LocalTime

@throws DateTimeException      If the time is not valid.
@throws DateTimeParseException If the text string does not follow the expected format.
Obtains an instance of LocalTime from a text string .