13
13
14
14
namespace League \Csv ;
15
15
16
+ use Deprecated ;
16
17
use Generator ;
17
18
use InvalidArgumentException ;
18
19
use RuntimeException ;
@@ -399,6 +400,7 @@ public function addStreamFilter(string $filtername, null|array $params = null):
399
400
*
400
401
* Returns the stream filter mode.
401
402
*/
403
+ #[Deprecated(message:'Use AbstractCsv::supportsStreamFilterOnRead or AbstractCsv::supportsStreamFilterOnWrite instead ' , since:'league/csv:9.7.0 ' )]
402
404
public function getStreamFilterMode (): int
403
405
{
404
406
return static ::STREAM_FILTER_MODE ;
@@ -414,6 +416,7 @@ public function getStreamFilterMode(): int
414
416
*
415
417
* Tells whether the stream filter capabilities can be used.
416
418
*/
419
+ #[Deprecated(message:'Use AbstractCsv::supportsStreamFilterOnRead or AbstractCsv::supportsStreamFilterOnWrite instead ' , since:'league/csv:9.7.0 ' )]
417
420
public function supportsStreamFilter (): bool
418
421
{
419
422
return $ this ->document instanceof Stream;
@@ -428,6 +431,7 @@ public function supportsStreamFilter(): bool
428
431
* @see AbstractCsv::toString
429
432
* @codeCoverageIgnore
430
433
*/
434
+ #[Deprecated(message:'Use AbstractCsv::toString instead ' , since:'league/csv:9.7.0 ' )]
431
435
public function getContent (): string
432
436
{
433
437
return $ this ->toString ();
@@ -442,6 +446,7 @@ public function getContent(): string
442
446
*
443
447
* Retrieves the CSV content
444
448
*/
449
+ #[Deprecated(message:'Use AbstractCsv::toString instead ' , since:'league/csv:9.1.0 ' )]
445
450
public function __toString (): string
446
451
{
447
452
return $ this ->toString ();
@@ -462,6 +467,7 @@ public function __toString(): string
462
467
* @deprecated since version 9.17.0
463
468
* @see https://tools.ietf.org/html/rfc6266#section-4.3
464
469
*/
470
+ #[Deprecated(message:'Use HttpHeaders::forFileDownload instead ' , since:'league/csv:9.17.0 ' )]
465
471
protected function sendHeaders (string $ filename ): void
466
472
{
467
473
if (strlen ($ filename ) !== strcspn ($ filename , '\\/ ' )) {
@@ -501,6 +507,7 @@ protected function sendHeaders(string $filename): void
501
507
*
502
508
* @throws Exception
503
509
*/
510
+ #[Deprecated(message:'Use AbstractCsv::download instead ' , since:'league/csv:9.18.0 ' )]
504
511
public function output (?string $ filename = null ): int
505
512
{
506
513
try {
0 commit comments