48 if ( in_array(
'error', $flags ) ) {
49 return [ $text, $flags ];
51 $blobStore = $this->getServiceContainer()->getBlobStore();
52 if ( in_array(
'external', $flags ) && $blobStore instanceof
SqlBlobStore ) {
53 $newText = $blobStore->expandBlob( $text, $flags );
54 if ( $newText ===
false ) {
55 return [
false, $flags ];
59 $flags = array_diff( $flags, [
'external' ] );
61 if ( in_array(
'gzip', $flags ) ) {
62 $newText = gzinflate( $text );
63 if ( $newText ===
false ) {
64 return [
false, $flags ];
67 $flags = array_diff( $flags, [
'gzip' ] );
69 return [ $text, $flags ];