updated-packages
This commit is contained in:
117
vendor/maatwebsite/excel/src/Concerns/Exportable.php
vendored
Normal file
117
vendor/maatwebsite/excel/src/Concerns/Exportable.php
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Foundation\Bus\PendingDispatch;
|
||||
use Maatwebsite\Excel\Exceptions\NoFilenameGivenException;
|
||||
use Maatwebsite\Excel\Exceptions\NoFilePathGivenException;
|
||||
use Maatwebsite\Excel\Exporter;
|
||||
|
||||
trait Exportable
|
||||
{
|
||||
/**
|
||||
* @param string $fileName
|
||||
* @param string|null $writerType
|
||||
* @param array $headers
|
||||
*
|
||||
* @throws NoFilenameGivenException
|
||||
* @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(string $fileName = null, string $writerType = null, array $headers = null)
|
||||
{
|
||||
$headers = $headers ?? $this->headers ?? [];
|
||||
$fileName = $fileName ?? $this->fileName ?? null;
|
||||
$writerType = $writerType ?? $this->writerType ?? null;
|
||||
|
||||
if (null === $fileName) {
|
||||
throw new NoFilenameGivenException();
|
||||
}
|
||||
|
||||
return $this->getExporter()->download($this, $fileName, $writerType, $headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $writerType
|
||||
* @param mixed $diskOptions
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return bool|PendingDispatch
|
||||
*/
|
||||
public function store(string $filePath = null, string $disk = null, string $writerType = null, $diskOptions = [])
|
||||
{
|
||||
$filePath = $filePath ?? $this->filePath ?? null;
|
||||
|
||||
if (null === $filePath) {
|
||||
throw NoFilePathGivenException::export();
|
||||
}
|
||||
|
||||
return $this->getExporter()->store(
|
||||
$this,
|
||||
$filePath,
|
||||
$disk ?? $this->disk ?? null,
|
||||
$writerType ?? $this->writerType ?? null,
|
||||
$diskOptions ?? $this->diskOptions ?? []
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $writerType
|
||||
* @param mixed $diskOptions
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return PendingDispatch
|
||||
*/
|
||||
public function queue(string $filePath = null, string $disk = null, string $writerType = null, $diskOptions = [])
|
||||
{
|
||||
$filePath = $filePath ?? $this->filePath ?? null;
|
||||
|
||||
if (null === $filePath) {
|
||||
throw NoFilePathGivenException::export();
|
||||
}
|
||||
|
||||
return $this->getExporter()->queue(
|
||||
$this,
|
||||
$filePath,
|
||||
$disk ?? $this->disk ?? null,
|
||||
$writerType ?? $this->writerType ?? null,
|
||||
$diskOptions ?? $this->diskOptions ?? []
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $writerType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function raw($writerType = null)
|
||||
{
|
||||
$writerType = $writerType ?? $this->writerType ?? null;
|
||||
|
||||
return $this->getExporter()->raw($this, $writerType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an HTTP response that represents the object.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @throws NoFilenameGivenException
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function toResponse($request)
|
||||
{
|
||||
return $this->download();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Exporter
|
||||
*/
|
||||
private function getExporter(): Exporter
|
||||
{
|
||||
return app(Exporter::class);
|
||||
}
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/FromArray.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/FromArray.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface FromArray
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function array(): array;
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/FromCollection.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/FromCollection.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface FromCollection
|
||||
{
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function collection();
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/FromGenerator.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/FromGenerator.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Generator;
|
||||
|
||||
interface FromGenerator
|
||||
{
|
||||
/**
|
||||
* @return Generator
|
||||
*/
|
||||
public function generator(): Generator;
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/FromIterator.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/FromIterator.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Iterator;
|
||||
|
||||
interface FromIterator
|
||||
{
|
||||
/**
|
||||
* @return Iterator
|
||||
*/
|
||||
public function iterator(): Iterator;
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/FromQuery.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/FromQuery.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Database\Query\Builder;
|
||||
|
||||
interface FromQuery
|
||||
{
|
||||
/**
|
||||
* @return Builder
|
||||
*/
|
||||
public function query();
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/FromView.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/FromView.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
interface FromView
|
||||
{
|
||||
/**
|
||||
* @return View
|
||||
*/
|
||||
public function view(): View;
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/HasReferencesToOtherSheets.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/HasReferencesToOtherSheets.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface HasReferencesToOtherSheets
|
||||
{
|
||||
}
|
||||
149
vendor/maatwebsite/excel/src/Concerns/Importable.php
vendored
Normal file
149
vendor/maatwebsite/excel/src/Concerns/Importable.php
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Console\OutputStyle;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\PendingDispatch;
|
||||
use Illuminate\Support\Collection;
|
||||
use InvalidArgumentException;
|
||||
use Maatwebsite\Excel\Exceptions\NoFilePathGivenException;
|
||||
use Maatwebsite\Excel\Importer;
|
||||
use Symfony\Component\Console\Input\StringInput;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
trait Importable
|
||||
{
|
||||
/**
|
||||
* @var OutputStyle|null
|
||||
*/
|
||||
protected $output;
|
||||
|
||||
/**
|
||||
* @param string|UploadedFile|null $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $readerType
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return Importer|PendingDispatch
|
||||
*/
|
||||
public function import($filePath = null, string $disk = null, string $readerType = null)
|
||||
{
|
||||
$filePath = $this->getFilePath($filePath);
|
||||
|
||||
return $this->getImporter()->import(
|
||||
$this,
|
||||
$filePath,
|
||||
$disk ?? $this->disk ?? null,
|
||||
$readerType ?? $this->readerType ?? null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|UploadedFile|null $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $readerType
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($filePath = null, string $disk = null, string $readerType = null): array
|
||||
{
|
||||
$filePath = $this->getFilePath($filePath);
|
||||
|
||||
return $this->getImporter()->toArray(
|
||||
$this,
|
||||
$filePath,
|
||||
$disk ?? $this->disk ?? null,
|
||||
$readerType ?? $this->readerType ?? null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|UploadedFile|null $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $readerType
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return Collection
|
||||
*/
|
||||
public function toCollection($filePath = null, string $disk = null, string $readerType = null): Collection
|
||||
{
|
||||
$filePath = $this->getFilePath($filePath);
|
||||
|
||||
return $this->getImporter()->toCollection(
|
||||
$this,
|
||||
$filePath,
|
||||
$disk ?? $this->disk ?? null,
|
||||
$readerType ?? $this->readerType ?? null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|UploadedFile|null $filePath
|
||||
* @param string|null $disk
|
||||
* @param string|null $readerType
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @throws InvalidArgumentException
|
||||
* @return PendingDispatch
|
||||
*/
|
||||
public function queue($filePath = null, string $disk = null, string $readerType = null)
|
||||
{
|
||||
if (!$this instanceof ShouldQueue) {
|
||||
throw new InvalidArgumentException('Importable should implement ShouldQueue to be queued.');
|
||||
}
|
||||
|
||||
return $this->import($filePath, $disk, $readerType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputStyle $output
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function withOutput(OutputStyle $output)
|
||||
{
|
||||
$this->output = $output;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return OutputStyle
|
||||
*/
|
||||
public function getConsoleOutput(): OutputStyle
|
||||
{
|
||||
if (!$this->output instanceof OutputStyle) {
|
||||
$this->output = new OutputStyle(new StringInput(''), new NullOutput());
|
||||
}
|
||||
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UploadedFile|string|null $filePath
|
||||
*
|
||||
* @throws NoFilePathGivenException
|
||||
* @return UploadedFile|string
|
||||
*/
|
||||
private function getFilePath($filePath = null)
|
||||
{
|
||||
$filePath = $filePath ?? $this->filePath ?? null;
|
||||
|
||||
if (null === $filePath) {
|
||||
throw NoFilePathGivenException::import();
|
||||
}
|
||||
|
||||
return $filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Importer
|
||||
*/
|
||||
private function getImporter(): Importer
|
||||
{
|
||||
return app(Importer::class);
|
||||
}
|
||||
}
|
||||
69
vendor/maatwebsite/excel/src/Concerns/MapsCsvSettings.php
vendored
Normal file
69
vendor/maatwebsite/excel/src/Concerns/MapsCsvSettings.php
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
trait MapsCsvSettings
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $delimiter = ',';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $enclosure = '"';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $lineEnding = PHP_EOL;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected static $useBom = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected static $includeSeparatorLine = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected static $excelCompatibility = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $escapeCharacter = '\\';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected static $contiguous = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $inputEncoding = 'UTF-8';
|
||||
|
||||
/**
|
||||
* @param array $config
|
||||
*/
|
||||
public static function applyCsvSettings(array $config)
|
||||
{
|
||||
static::$delimiter = Arr::get($config, 'delimiter', static::$delimiter);
|
||||
static::$enclosure = Arr::get($config, 'enclosure', static::$enclosure);
|
||||
static::$lineEnding = Arr::get($config, 'line_ending', static::$lineEnding);
|
||||
static::$useBom = Arr::get($config, 'use_bom', static::$useBom);
|
||||
static::$includeSeparatorLine = Arr::get($config, 'include_separator_line', static::$includeSeparatorLine);
|
||||
static::$excelCompatibility = Arr::get($config, 'excel_compatibility', static::$excelCompatibility);
|
||||
static::$escapeCharacter = Arr::get($config, 'escape_character', static::$escapeCharacter);
|
||||
static::$contiguous = Arr::get($config, 'contiguous', static::$contiguous);
|
||||
static::$inputEncoding = Arr::get($config, 'input_encoding', static::$inputEncoding);
|
||||
}
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/OnEachRow.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/OnEachRow.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Maatwebsite\Excel\Row;
|
||||
|
||||
interface OnEachRow
|
||||
{
|
||||
/**
|
||||
* @param Row $row
|
||||
*/
|
||||
public function onRow(Row $row);
|
||||
}
|
||||
52
vendor/maatwebsite/excel/src/Concerns/RegistersEventListeners.php
vendored
Normal file
52
vendor/maatwebsite/excel/src/Concerns/RegistersEventListeners.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Maatwebsite\Excel\Events\AfterImport;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use Maatwebsite\Excel\Events\BeforeExport;
|
||||
use Maatwebsite\Excel\Events\BeforeImport;
|
||||
use Maatwebsite\Excel\Events\BeforeSheet;
|
||||
use Maatwebsite\Excel\Events\BeforeWriting;
|
||||
use Maatwebsite\Excel\Events\ImportFailed;
|
||||
|
||||
trait RegistersEventListeners
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$listeners = [];
|
||||
|
||||
if (method_exists($this, 'beforeExport')) {
|
||||
$listeners[BeforeExport::class] = [static::class, 'beforeExport'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'beforeWriting')) {
|
||||
$listeners[BeforeWriting::class] = [static::class, 'beforeWriting'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'beforeImport')) {
|
||||
$listeners[BeforeImport::class] = [static::class, 'beforeImport'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'afterImport')) {
|
||||
$listeners[AfterImport::class] = [static::class, 'afterImport'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'importFailed')) {
|
||||
$listeners[ImportFailed::class] = [static::class, 'importFailed'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'beforeSheet')) {
|
||||
$listeners[BeforeSheet::class] = [static::class, 'beforeSheet'];
|
||||
}
|
||||
|
||||
if (method_exists($this, 'afterSheet')) {
|
||||
$listeners[AfterSheet::class] = [static::class, 'afterSheet'];
|
||||
}
|
||||
|
||||
return $listeners;
|
||||
}
|
||||
}
|
||||
27
vendor/maatwebsite/excel/src/Concerns/RemembersChunkOffset.php
vendored
Normal file
27
vendor/maatwebsite/excel/src/Concerns/RemembersChunkOffset.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
trait RemembersChunkOffset
|
||||
{
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
protected $chunkOffset;
|
||||
|
||||
/**
|
||||
* @param int $chunkOffset
|
||||
*/
|
||||
public function setChunkOffset(int $chunkOffset)
|
||||
{
|
||||
$this->chunkOffset = $chunkOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getChunkOffset()
|
||||
{
|
||||
return $this->chunkOffset;
|
||||
}
|
||||
}
|
||||
27
vendor/maatwebsite/excel/src/Concerns/RemembersRowNumber.php
vendored
Normal file
27
vendor/maatwebsite/excel/src/Concerns/RemembersRowNumber.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
trait RemembersRowNumber
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $rowNumber;
|
||||
|
||||
/**
|
||||
* @param int $rowNumber
|
||||
*/
|
||||
public function rememberRowNumber(int $rowNumber)
|
||||
{
|
||||
$this->rowNumber = $rowNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getRowNumber()
|
||||
{
|
||||
return $this->rowNumber;
|
||||
}
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/ShouldAutoSize.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/ShouldAutoSize.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface ShouldAutoSize
|
||||
{
|
||||
}
|
||||
9
vendor/maatwebsite/excel/src/Concerns/ShouldQueueWithoutChain.php
vendored
Normal file
9
vendor/maatwebsite/excel/src/Concerns/ShouldQueueWithoutChain.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
interface ShouldQueueWithoutChain extends ShouldQueue
|
||||
{
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/SkipsEmptyRows.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/SkipsEmptyRows.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface SkipsEmptyRows
|
||||
{
|
||||
}
|
||||
30
vendor/maatwebsite/excel/src/Concerns/SkipsErrors.php
vendored
Normal file
30
vendor/maatwebsite/excel/src/Concerns/SkipsErrors.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Throwable;
|
||||
|
||||
trait SkipsErrors
|
||||
{
|
||||
/**
|
||||
* @var Throwable[]
|
||||
*/
|
||||
protected $errors = [];
|
||||
|
||||
/**
|
||||
* @param Throwable $e
|
||||
*/
|
||||
public function onError(Throwable $e)
|
||||
{
|
||||
$this->errors[] = $e;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Throwable[]|Collection
|
||||
*/
|
||||
public function errors(): Collection
|
||||
{
|
||||
return new Collection($this->errors);
|
||||
}
|
||||
}
|
||||
30
vendor/maatwebsite/excel/src/Concerns/SkipsFailures.php
vendored
Normal file
30
vendor/maatwebsite/excel/src/Concerns/SkipsFailures.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Maatwebsite\Excel\Validators\Failure;
|
||||
|
||||
trait SkipsFailures
|
||||
{
|
||||
/**
|
||||
* @var Failure[]
|
||||
*/
|
||||
protected $failures = [];
|
||||
|
||||
/**
|
||||
* @param Failure ...$failures
|
||||
*/
|
||||
public function onFailure(Failure ...$failures)
|
||||
{
|
||||
$this->failures = array_merge($this->failures, $failures);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Failure[]|Collection
|
||||
*/
|
||||
public function failures(): Collection
|
||||
{
|
||||
return new Collection($this->failures);
|
||||
}
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/SkipsOnError.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/SkipsOnError.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Throwable;
|
||||
|
||||
interface SkipsOnError
|
||||
{
|
||||
/**
|
||||
* @param Throwable $e
|
||||
*/
|
||||
public function onError(Throwable $e);
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/SkipsOnFailure.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/SkipsOnFailure.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Maatwebsite\Excel\Validators\Failure;
|
||||
|
||||
interface SkipsOnFailure
|
||||
{
|
||||
/**
|
||||
* @param Failure[] $failures
|
||||
*/
|
||||
public function onFailure(Failure ...$failures);
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/SkipsUnknownSheets.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/SkipsUnknownSheets.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface SkipsUnknownSheets
|
||||
{
|
||||
/**
|
||||
* @param string|int $sheetName
|
||||
*/
|
||||
public function onUnknownSheet($sheetName);
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/ToArray.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/ToArray.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface ToArray
|
||||
{
|
||||
/**
|
||||
* @param array $array
|
||||
*/
|
||||
public function array(array $array);
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/ToCollection.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/ToCollection.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface ToCollection
|
||||
{
|
||||
/**
|
||||
* @param Collection $collection
|
||||
*/
|
||||
public function collection(Collection $collection);
|
||||
}
|
||||
15
vendor/maatwebsite/excel/src/Concerns/ToModel.php
vendored
Normal file
15
vendor/maatwebsite/excel/src/Concerns/ToModel.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
interface ToModel
|
||||
{
|
||||
/**
|
||||
* @param array $row
|
||||
*
|
||||
* @return Model|Model[]|null
|
||||
*/
|
||||
public function model(array $row);
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithBatchInserts.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithBatchInserts.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithBatchInserts
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function batchSize(): int;
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/WithCalculatedFormulas.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/WithCalculatedFormulas.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithCalculatedFormulas
|
||||
{
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/WithCharts.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/WithCharts.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Chart\Chart;
|
||||
|
||||
interface WithCharts
|
||||
{
|
||||
/**
|
||||
* @return Chart|Chart[]
|
||||
*/
|
||||
public function charts();
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithChunkReading.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithChunkReading.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithChunkReading
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function chunkSize(): int;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithColumnFormatting.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithColumnFormatting.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithColumnFormatting
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function columnFormats(): array;
|
||||
}
|
||||
8
vendor/maatwebsite/excel/src/Concerns/WithColumnLimit.php
vendored
Normal file
8
vendor/maatwebsite/excel/src/Concerns/WithColumnLimit.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithColumnLimit
|
||||
{
|
||||
public function endColumn(): string;
|
||||
}
|
||||
8
vendor/maatwebsite/excel/src/Concerns/WithColumnWidths.php
vendored
Normal file
8
vendor/maatwebsite/excel/src/Concerns/WithColumnWidths.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithColumnWidths
|
||||
{
|
||||
public function columnWidths(): array;
|
||||
}
|
||||
38
vendor/maatwebsite/excel/src/Concerns/WithConditionalSheets.php
vendored
Normal file
38
vendor/maatwebsite/excel/src/Concerns/WithConditionalSheets.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
trait WithConditionalSheets
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $conditionallySelectedSheets = [];
|
||||
|
||||
/**
|
||||
* @param string|array $sheets
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function onlySheets($sheets)
|
||||
{
|
||||
$this->conditionallySelectedSheets = is_array($sheets) ? $sheets : func_get_args();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function sheets(): array
|
||||
{
|
||||
return \array_filter($this->conditionalSheets(), function ($name) {
|
||||
return \in_array($name, $this->conditionallySelectedSheets, false);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
abstract public function conditionalSheets(): array;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithCustomChunkSize.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithCustomChunkSize.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithCustomChunkSize
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function chunkSize(): int;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithCustomCsvSettings.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithCustomCsvSettings.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithCustomCsvSettings
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getCsvSettings(): array;
|
||||
}
|
||||
17
vendor/maatwebsite/excel/src/Concerns/WithCustomQuerySize.php
vendored
Normal file
17
vendor/maatwebsite/excel/src/Concerns/WithCustomQuerySize.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithCustomQuerySize
|
||||
{
|
||||
/**
|
||||
* Queued exportables are processed in chunks; each chunk being a job pushed to the queue by the QueuedWriter.
|
||||
* In case of exportables that implement the FromQuery concern, the number of jobs is calculated by dividing the $query->count() by the chunk size.
|
||||
* Depending on the implementation of the query() method (eg. When using a groupBy clause), this calculation might not be correct.
|
||||
*
|
||||
* When this is the case, you should use this method to provide a custom calculation of the query size.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function querySize(): int;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithCustomStartCell.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithCustomStartCell.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithCustomStartCell
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function startCell(): string;
|
||||
}
|
||||
9
vendor/maatwebsite/excel/src/Concerns/WithCustomValueBinder.php
vendored
Normal file
9
vendor/maatwebsite/excel/src/Concerns/WithCustomValueBinder.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Cell\IValueBinder;
|
||||
|
||||
interface WithCustomValueBinder extends IValueBinder
|
||||
{
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/WithDrawings.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/WithDrawings.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing;
|
||||
|
||||
interface WithDrawings
|
||||
{
|
||||
/**
|
||||
* @return BaseDrawing|BaseDrawing[]
|
||||
*/
|
||||
public function drawings();
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithEvents.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithEvents.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithEvents
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function registerEvents(): array;
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/WithFormatData.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/WithFormatData.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithFormatData
|
||||
{
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/WithHeadingRow.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/WithHeadingRow.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithHeadingRow
|
||||
{
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithHeadings.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithHeadings.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithHeadings
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function headings(): array;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithLimit.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithLimit.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithLimit
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function limit(): int;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithMappedCells.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithMappedCells.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithMappedCells
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function mapping(): array;
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/WithMapping.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/WithMapping.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithMapping
|
||||
{
|
||||
/**
|
||||
* @param mixed $row
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function map($row): array;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithMultipleSheets.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithMultipleSheets.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithMultipleSheets
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function sheets(): array;
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/WithPreCalculateFormulas.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/WithPreCalculateFormulas.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithPreCalculateFormulas
|
||||
{
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/WithProgressBar.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/WithProgressBar.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use Illuminate\Console\OutputStyle;
|
||||
|
||||
interface WithProgressBar
|
||||
{
|
||||
/**
|
||||
* @return OutputStyle
|
||||
*/
|
||||
public function getConsoleOutput(): OutputStyle;
|
||||
}
|
||||
8
vendor/maatwebsite/excel/src/Concerns/WithProperties.php
vendored
Normal file
8
vendor/maatwebsite/excel/src/Concerns/WithProperties.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithProperties
|
||||
{
|
||||
public function properties(): array;
|
||||
}
|
||||
13
vendor/maatwebsite/excel/src/Concerns/WithReadFilter.php
vendored
Normal file
13
vendor/maatwebsite/excel/src/Concerns/WithReadFilter.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
|
||||
|
||||
interface WithReadFilter
|
||||
{
|
||||
/**
|
||||
* @return IReadFilter
|
||||
*/
|
||||
public function readFilter(): IReadFilter;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithStartRow.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithStartRow.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithStartRow
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function startRow(): int;
|
||||
}
|
||||
7
vendor/maatwebsite/excel/src/Concerns/WithStrictNullComparison.php
vendored
Normal file
7
vendor/maatwebsite/excel/src/Concerns/WithStrictNullComparison.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithStrictNullComparison
|
||||
{
|
||||
}
|
||||
10
vendor/maatwebsite/excel/src/Concerns/WithStyles.php
vendored
Normal file
10
vendor/maatwebsite/excel/src/Concerns/WithStyles.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
interface WithStyles
|
||||
{
|
||||
public function styles(Worksheet $sheet);
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithTitle.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithTitle.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithTitle
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function title(): string;
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithUpsertColumns.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithUpsertColumns.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithUpsertColumns
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function upsertColumns();
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithUpserts.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithUpserts.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithUpserts
|
||||
{
|
||||
/**
|
||||
* @return string|array
|
||||
*/
|
||||
public function uniqueBy();
|
||||
}
|
||||
11
vendor/maatwebsite/excel/src/Concerns/WithValidation.php
vendored
Normal file
11
vendor/maatwebsite/excel/src/Concerns/WithValidation.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Concerns;
|
||||
|
||||
interface WithValidation
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array;
|
||||
}
|
||||
Reference in New Issue
Block a user