Locker\Helpers\Attachments::getBoundary PHP 메소드

getBoundary() 개인적인 정적인 메소드

Gets the boundary from the content type.
private static getBoundary ( String $content_type ) : String
$content_type String
리턴 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];
    }