Esempio n. 1
0
 private function _parseBlockData(ProtocolReply $reply, $startDelimiter, $endDelimter)
 {
     $reply->next();
     $line = $reply->current();
     if ($line != $startDelimiter) {
         throw new ProtocolError('Expected line beginning with "' . $startDelimiter . '"');
     }
     $key = $line . "\n";
     do {
         $reply->next();
         $line = $reply->current();
         $key .= $line . "\n";
     } while ($line && $line != $endDelimter);
     return $key;
 }