WithColumnLimit.php 0000644 00000000165 15152066300 0010345 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithColumnLimit
{
public function endColumn(): string;
}
FromArray.php 0000644 00000000217 15152066300 0007155 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface FromArray
{
/**
* @return array
*/
public function array(): array;
}
WithCharts.php 0000644 00000000275 15152066300 0007337 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Chart\Chart;
interface WithCharts
{
/**
* @return Chart|Chart[]
*/
public function charts();
}
WithCalculatedFormulas.php 0000644 00000000123 15152066300 0011655 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithCalculatedFormulas
{
}
SkipsOnFailure.php 0000644 00000000337 15152066300 0010154 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Maatwebsite\Excel\Validators\Failure;
interface SkipsOnFailure
{
/**
* @param Failure[] $failures
*/
public function onFailure(Failure ...$failures);
}
FromGenerator.php 0000644 00000000257 15152066300 0010031 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Generator;
interface FromGenerator
{
/**
* @return Generator
*/
public function generator(): Generator;
}
SkipsUnknownSheets.php 0000644 00000000265 15152066300 0011103 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface SkipsUnknownSheets
{
/**
* @param string|int $sheetName
*/
public function onUnknownSheet($sheetName);
}
FromCollection.php 0000644 00000000273 15152066300 0010174 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Support\Collection;
interface FromCollection
{
/**
* @return Collection
*/
public function collection();
}
WithConditionalSheets.php 0000644 00000001406 15152066300 0011527 0 ustar 00 <?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;
}
WithBackgroundColor.php 0000644 00000000324 15152066300 0011164 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Style\Color;
interface WithBackgroundColor
{
/**
* @return string|array|Color
*/
public function backgroundColor();
}
FromIterator.php 0000644 00000000252 15152066300 0007667 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Iterator;
interface FromIterator
{
/**
* @return Iterator
*/
public function iterator(): Iterator;
}
WithStrictNullComparison.php 0000644 00000000125 15152066300 0012243 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithStrictNullComparison
{
}
PersistRelations.php 0000644 00000000115 15152066300 0010562 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface PersistRelations
{
}
WithDrawings.php 0000644 00000000327 15152066300 0007667 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing;
interface WithDrawings
{
/**
* @return BaseDrawing|BaseDrawing[]
*/
public function drawings();
}
Exportable.php 0000644 00000006277 15152066300 0007374 0 ustar 00 <?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
* @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\BinaryFileResponse
*
* @throws NoFilenameGivenException
*/
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
* @return bool|PendingDispatch
*
* @throws NoFilePathGivenException
*/
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
* @return PendingDispatch
*
* @throws NoFilePathGivenException
*/
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
* @return \Illuminate\Http\Response
*
* @throws NoFilenameGivenException
*/
public function toResponse($request)
{
return $this->download();
}
/**
* @return Exporter
*/
private function getExporter(): Exporter
{
return app(Exporter::class);
}
}
WithUpserts.php 0000644 00000000224 15152066300 0007552 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithUpserts
{
/**
* @return string|array
*/
public function uniqueBy();
}
WithFormatData.php 0000644 00000000113 15152066300 0010124 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithFormatData
{
}
FromQuery.php 0000644 00000000565 15152066300 0007212 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Query\Builder;
use Laravel\Scout\Builder as ScoutBuilder;
interface FromQuery
{
/**
* @return Builder|EloquentBuilder|Relation|ScoutBuilder
*/
public function query();
}
Importable.php 0000644 00000007504 15152066300 0007357 0 ustar 00 <?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
* @return Importer|PendingDispatch
*
* @throws NoFilePathGivenException
*/
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
* @return array
*
* @throws NoFilePathGivenException
*/
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
* @return Collection
*
* @throws NoFilePathGivenException
*/
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
* @return PendingDispatch
*
* @throws NoFilePathGivenException
* @throws InvalidArgumentException
*/
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
* @return UploadedFile|string
*
* @throws NoFilePathGivenException
*/
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);
}
}
WithHeadings.php 0000644 00000000225 15152066300 0007630 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithHeadings
{
/**
* @return array
*/
public function headings(): array;
}
WithProgressBar.php 0000644 00000000321 15152066300 0010334 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Console\OutputStyle;
interface WithProgressBar
{
/**
* @return OutputStyle
*/
public function getConsoleOutput(): OutputStyle;
}
RemembersRowNumber.php 0000644 00000000627 15152066300 0011042 0 ustar 00 <?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;
}
}
WithBatchInserts.php 0000644 00000000226 15152066300 0010500 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithBatchInserts
{
/**
* @return int
*/
public function batchSize(): int;
}
WithMappedCells.php 0000644 00000000227 15152066300 0010301 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithMappedCells
{
/**
* @return array
*/
public function mapping(): array;
}
SkipsOnError.php 0000644 00000000261 15152066300 0007652 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Throwable;
interface SkipsOnError
{
/**
* @param Throwable $e
*/
public function onError(Throwable $e);
}
WithMultipleSheets.php 0000644 00000000231 15152066300 0011052 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithMultipleSheets
{
/**
* @return array
*/
public function sheets(): array;
}
WithValidation.php 0000644 00000000224 15152066300 0010177 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithValidation
{
/**
* @return array
*/
public function rules(): array;
}
WithGroupedHeadingRow.php 0000644 00000000151 15152066300 0011461 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithGroupedHeadingRow extends WithHeadingRow
{
}
WithCustomCsvSettings.php 0000644 00000000244 15152066300 0011556 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithCustomCsvSettings
{
/**
* @return array
*/
public function getCsvSettings(): array;
}
WithProperties.php 0000644 00000000164 15152066300 0010244 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithProperties
{
public function properties(): array;
}
WithColumnWidths.php 0000644 00000000170 15152066300 0010525 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithColumnWidths
{
public function columnWidths(): array;
}
WithUpsertColumns.php 0000644 00000000230 15152066300 0010725 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithUpsertColumns
{
/**
* @return array
*/
public function upsertColumns();
}
ShouldAutoSize.php 0000644 00000000113 15152066300 0010170 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface ShouldAutoSize
{
}
WithChunkReading.php 0000644 00000000226 15152066300 0010451 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithChunkReading
{
/**
* @return int
*/
public function chunkSize(): int;
}
ShouldQueueWithoutChain.php 0000644 00000000225 15152066300 0012044 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Contracts\Queue\ShouldQueue;
interface ShouldQueueWithoutChain extends ShouldQueue
{
}
WithPreCalculateFormulas.php 0000644 00000000125 15152066300 0012162 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithPreCalculateFormulas
{
}
ToCollection.php 0000644 00000000334 15152066300 0007651 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Support\Collection;
interface ToCollection
{
/**
* @param Collection $collection
*/
public function collection(Collection $collection);
}
SkipsFailures.php 0000644 00000001055 15152066300 0010040 0 ustar 00 <?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);
}
}
WithStyles.php 0000644 00000000250 15152066300 0007367 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
interface WithStyles
{
public function styles(Worksheet $sheet);
}
SkipsEmptyRows.php 0000644 00000000113 15152066300 0010231 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface SkipsEmptyRows
{
}
WithLimit.php 0000644 00000000213 15152066300 0007161 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithLimit
{
/**
* @return int
*/
public function limit(): int;
}
OnEachRow.php 0000644 00000000260 15152066300 0007076 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Maatwebsite\Excel\Row;
interface OnEachRow
{
/**
* @param Row $row
*/
public function onRow(Row $row);
}
WithEvents.php 0000644 00000000231 15152066300 0007347 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithEvents
{
/**
* @return array
*/
public function registerEvents(): array;
}
WithCustomChunkSize.php 0000644 00000000231 15152066300 0011201 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithCustomChunkSize
{
/**
* @return int
*/
public function chunkSize(): int;
}
ToModel.php 0000644 00000000341 15152066300 0006614 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Database\Eloquent\Model;
interface ToModel
{
/**
* @param array $row
* @return Model|Model[]|null
*/
public function model(array $row);
}
ToArray.php 0000644 00000000232 15152066300 0006631 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface ToArray
{
/**
* @param array $array
*/
public function array(array $array);
}
HasReferencesToOtherSheets.php 0000644 00000000127 15152066300 0012451 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface HasReferencesToOtherSheets
{
}
SkipsErrors.php 0000644 00000000727 15152066300 0007547 0 ustar 00 <?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);
}
}
WithMapping.php 0000644 00000000326 15152066300 0007503 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
/**
* @template RowType of mixed
*/
interface WithMapping
{
/**
* @param RowType $row
* @return array
*/
public function map($row): array;
}
WithStartRow.php 0000644 00000000221 15152066300 0007667 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithStartRow
{
/**
* @return int
*/
public function startRow(): int;
}
WithReadFilter.php 0000644 00000000327 15152066300 0010132 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
interface WithReadFilter
{
/**
* @return IReadFilter
*/
public function readFilter(): IReadFilter;
}
WithCustomValueBinder.php 0000644 00000000230 15152066300 0011475 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Cell\IValueBinder;
interface WithCustomValueBinder extends IValueBinder
{
}
WithDefaultStyles.php 0000644 00000000333 15152066300 0010676 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use PhpOffice\PhpSpreadsheet\Style\Style;
interface WithDefaultStyles
{
/**
* @return array|void
*/
public function defaultStyles(Style $defaultStyle);
}
WithColumnFormatting.php 0000644 00000000242 15152066300 0011375 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithColumnFormatting
{
/**
* @return array
*/
public function columnFormats(): array;
}
RegistersEventListeners.php 0000644 00000002565 15152066300 0012125 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Maatwebsite\Excel\Events\AfterBatch;
use Maatwebsite\Excel\Events\AfterChunk;
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
{
$listenersClasses = [
BeforeExport::class => 'beforeExport',
BeforeWriting::class => 'beforeWriting',
BeforeImport::class => 'beforeImport',
AfterImport::class => 'afterImport',
AfterBatch::class => 'afterBatch',
AfterChunk::class => 'afterChunk',
ImportFailed::class => 'importFailed',
BeforeSheet::class => 'beforeSheet',
AfterSheet::class => 'afterSheet',
];
$listeners = [];
foreach ($listenersClasses as $class => $name) {
// Method names are case insensitive in php
if (method_exists($this, $name)) {
// Allow methods to not be static
$listeners[$class] = [$this, $name];
}
}
return $listeners;
}
}
WithTitle.php 0000644 00000000221 15152066300 0007163 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithTitle
{
/**
* @return string
*/
public function title(): string;
}
WithCustomStartCell.php 0000644 00000000237 15152066300 0011201 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithCustomStartCell
{
/**
* @return string
*/
public function startCell(): string;
}
WithHeadingRow.php 0000644 00000000113 15152066300 0010131 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
interface WithHeadingRow
{
}
RemembersChunkOffset.php 0000644 00000000651 15152066300 0011336 0 ustar 00 <?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;
}
}
MapsCsvSettings.php 0000644 00000004215 15152066300 0010352 0 ustar 00 <?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';
/**
* @var string
*/
protected static $outputEncoding = '';
/**
* @var bool
*/
protected static $testAutoDetect = true;
/**
* @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);
static::$outputEncoding = Arr::get($config, 'output_encoding', static::$outputEncoding);
static::$testAutoDetect = Arr::get($config, 'test_auto_detect', static::$testAutoDetect);
}
}
WithCustomQuerySize.php 0000644 00000001245 15152066300 0011244 0 ustar 00 <?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;
}
FromView.php 0000644 00000000260 15152066300 0007007 0 ustar 00 <?php
namespace Maatwebsite\Excel\Concerns;
use Illuminate\Contracts\View\View;
interface FromView
{
/**
* @return View
*/
public function view(): View;
}