Polyfill
10 months ago
AbstractCsv.php
10 months ago
ByteSequence.php
10 months ago
CannotInsertRecord.php
10 months ago
CharsetConverter.php
10 months ago
ColumnConsistency.php
10 months ago
EncloseField.php
10 months ago
EscapeFormula.php
10 months ago
Exception.php
10 months ago
HTMLConverter.php
10 months ago
Info.php
10 months ago
InvalidArgument.php
10 months ago
MapIterator.php
10 months ago
RFC4180Field.php
10 months ago
Reader.php
10 months ago
ResultSet.php
10 months ago
Statement.php
10 months ago
Stream.php
10 months ago
SyntaxError.php
10 months ago
TabularDataReader.php
10 months ago
UnableToProcessCsv.php
10 months ago
UnavailableFeature.php
10 months ago
UnavailableStream.php
10 months ago
Writer.php
10 months ago
XMLConverter.php
10 months ago
functions.php
10 months ago
functions_include.php
10 months ago
functions.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * League.Csv (https://csv.thephpleague.com) |
| 5 | * |
| 6 | * (c) Ignace Nyamagana Butera <nyamsprod@gmail.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | declare (strict_types=1); |
| 12 | namespace IAWPSCOPED\League\Csv; |
| 13 | |
| 14 | /** |
| 15 | * DEPRECATION WARNING! This class will be removed in the next major point release. |
| 16 | * |
| 17 | * @deprecated since version 9.7.0 |
| 18 | * @see Info::fetchBOMSequence() |
| 19 | * |
| 20 | * Returns the BOM sequence found at the start of the string. |
| 21 | * |
| 22 | * If no valid BOM sequence is found an empty string is returned |
| 23 | * @internal |
| 24 | */ |
| 25 | function bom_match(string $str) : string |
| 26 | { |
| 27 | return Info::fetchBOMSequence($str) ?? ''; |
| 28 | } |
| 29 | /** |
| 30 | * @param array<string> $delimiters |
| 31 | * |
| 32 | * @return array<string,int> |
| 33 | * @deprecated since version 9.7.0 |
| 34 | * @see Info::getDelimiterStats() |
| 35 | * |
| 36 | * Detect Delimiters usage in a {@link Reader} object. |
| 37 | * |
| 38 | * Returns a associative array where each key represents |
| 39 | * a submitted delimiter and each value the number CSV fields found |
| 40 | * when processing at most $limit CSV records with the given delimiter |
| 41 | * |
| 42 | * @internal |
| 43 | */ |
| 44 | function delimiter_detect(Reader $csv, array $delimiters, int $limit = 1) : array |
| 45 | { |
| 46 | return Info::getDelimiterStats($csv, $delimiters, $limit); |
| 47 | } |
| 48 |