Locker\Helpers\Attachments::getBoundary PHP Method

getBoundary() private static method

Gets the boundary from the content type.
private static getBoundary ( String $content_type ) : String
$content_type String
return String
    private static function getBoundary($content_type)
    {
        preg_match('/boundary="?(.+?)"?$/', $content_type, $matches);
        if (!isset($matches[1])) {
            throw new Exceptions\Exception('You need to set a boundary if submitting attachments.');
        }
        return '--' . $matches[1];
    }