function parse($bytesAsString) { $lastParseException = null; $parsers = [Metric::parser(), Binary::parser()]; foreach ($parsers as $parser) { try { return $parser->parse($bytesAsString); } catch (\Exception $e) { $lastParseException = $e; } } throw $lastParseException; }
/** * parse method * * @param $bytesAsString * @return $this */ public static function parse($bytesAsString) { return parent::parse($bytesAsString); }