protected function boundarySplit($input, $boundary)
    {
        $tmp = explode('--' . $boundary, $input);

        for ($i = 1; $i < count($tmp)-1; $i++) {
            $parts[] = $tmp[$i];
        }

        return $parts;
    }