allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s

This commit is contained in:
2026-03-30 14:54:57 +07:00
parent 66aed7c4e8
commit b5e3a778ce
21316 changed files with 2777892 additions and 13 deletions

View File

@@ -0,0 +1,60 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Imports\ModelManager;
class AfterBatch extends Event
{
/**
* @var ModelManager
*/
public $manager;
/**
* @var int
*/
private $batchSize;
/**
* @var int
*/
private $startRow;
/**
* @param ModelManager $manager
* @param object $importable
* @param int $batchSize
* @param int $startRow
*/
public function __construct(ModelManager $manager, $importable, int $batchSize, int $startRow)
{
$this->manager = $manager;
$this->batchSize = $batchSize;
$this->startRow = $startRow;
parent::__construct($importable);
}
public function getManager(): ModelManager
{
return $this->manager;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->manager;
}
public function getBatchSize(): int
{
return $this->batchSize;
}
public function getStartRow(): int
{
return $this->startRow;
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Sheet;
class AfterChunk extends Event
{
/**
* @var Sheet
*/
private $sheet;
/**
* @var int
*/
private $startRow;
public function __construct(Sheet $sheet, $importable, int $startRow)
{
$this->sheet = $sheet;
$this->startRow = $startRow;
parent::__construct($importable);
}
public function getSheet(): Sheet
{
return $this->sheet;
}
public function getDelegate()
{
return $this->sheet;
}
public function getStartRow(): int
{
return $this->startRow;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Reader;
class AfterImport extends Event
{
/**
* @var Reader
*/
public $reader;
/**
* @param Reader $reader
* @param object $importable
*/
public function __construct(Reader $reader, $importable)
{
$this->reader = $reader;
parent::__construct($importable);
}
/**
* @return Reader
*/
public function getReader(): Reader
{
return $this->reader;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->reader;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Sheet;
class AfterSheet extends Event
{
/**
* @var Sheet
*/
public $sheet;
/**
* @param Sheet $sheet
* @param object $exportable
*/
public function __construct(Sheet $sheet, $exportable)
{
$this->sheet = $sheet;
parent::__construct($exportable);
}
/**
* @return Sheet
*/
public function getSheet(): Sheet
{
return $this->sheet;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->sheet;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Writer;
class BeforeExport extends Event
{
/**
* @var Writer
*/
public $writer;
/**
* @param Writer $writer
* @param object $exportable
*/
public function __construct(Writer $writer, $exportable)
{
$this->writer = $writer;
parent::__construct($exportable);
}
/**
* @return Writer
*/
public function getWriter(): Writer
{
return $this->writer;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->writer;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Reader;
class BeforeImport extends Event
{
/**
* @var Reader
*/
public $reader;
/**
* @param Reader $reader
* @param object $importable
*/
public function __construct(Reader $reader, $importable)
{
$this->reader = $reader;
parent::__construct($importable);
}
/**
* @return Reader
*/
public function getReader(): Reader
{
return $this->reader;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->reader;
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Sheet;
class BeforeSheet extends Event
{
/**
* @var Sheet
*/
public $sheet;
/**
* @param Sheet $sheet
* @param object $exportable
*/
public function __construct(Sheet $sheet, $exportable)
{
$this->sheet = $sheet;
parent::__construct($exportable);
}
/**
* @return Sheet
*/
public function getSheet(): Sheet
{
return $this->sheet;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->sheet;
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Maatwebsite\Excel\Events;
use Maatwebsite\Excel\Writer;
class BeforeWriting extends Event
{
/**
* @var Writer
*/
public $writer;
/**
* @var object
*/
private $exportable;
/**
* @param Writer $writer
* @param object $exportable
*/
public function __construct(Writer $writer, $exportable)
{
$this->writer = $writer;
parent::__construct($exportable);
}
/**
* @return Writer
*/
public function getWriter(): Writer
{
return $this->writer;
}
/**
* @return mixed
*/
public function getDelegate()
{
return $this->writer;
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Maatwebsite\Excel\Events;
/**
* @internal
*/
abstract class Event
{
/**
* @var object
*/
protected $concernable;
/**
* @param object $concernable
*/
public function __construct($concernable)
{
$this->concernable = $concernable;
}
/**
* @return object
*/
public function getConcernable()
{
return $this->concernable;
}
/**
* @return mixed
*/
abstract public function getDelegate();
/**
* @param string $concern
* @return bool
*/
public function appliesToConcern(string $concern): bool
{
return $this->getConcernable() instanceof $concern;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace Maatwebsite\Excel\Events;
use Throwable;
class ImportFailed
{
/**
* @var Throwable
*/
public $e;
/**
* @param Throwable $e
*/
public function __construct(Throwable $e)
{
$this->e = $e;
}
/**
* @return Throwable
*/
public function getException(): Throwable
{
return $this->e;
}
}