Файловый менеджер - Редактировать - /home/easybachat/hisabat365.com/4a7891/maatwebsite.zip
Ðазад
PK ��)[�ޠ� � excel/CODE_OF_CONDUCT.mdnu �[��� # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at patrick@spartner.nl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ PK ��)[NE��) ) excel/src/Writer.phpnu �[��� <?php namespace Maatwebsite\Excel; use Illuminate\Support\Arr; use Maatwebsite\Excel\Concerns\WithBackgroundColor; use Maatwebsite\Excel\Concerns\WithCustomValueBinder; use Maatwebsite\Excel\Concerns\WithDefaultStyles; use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Concerns\WithMultipleSheets; use Maatwebsite\Excel\Concerns\WithProperties; use Maatwebsite\Excel\Concerns\WithTitle; use Maatwebsite\Excel\Events\BeforeExport; use Maatwebsite\Excel\Events\BeforeWriting; use Maatwebsite\Excel\Factories\WriterFactory; use Maatwebsite\Excel\Files\RemoteTemporaryFile; use Maatwebsite\Excel\Files\TemporaryFile; use Maatwebsite\Excel\Files\TemporaryFileFactory; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Color; use PhpOffice\PhpSpreadsheet\Style\Fill; /** @mixin Spreadsheet */ class Writer { use DelegatedMacroable, HasEventBus; /** * @var Spreadsheet */ protected $spreadsheet; /** * @var object */ protected $exportable; /** * @var TemporaryFileFactory */ protected $temporaryFileFactory; /** * @param TemporaryFileFactory $temporaryFileFactory */ public function __construct(TemporaryFileFactory $temporaryFileFactory) { $this->temporaryFileFactory = $temporaryFileFactory; $this->setDefaultValueBinder(); } /** * @param object $export * @param string $writerType * @return TemporaryFile * * @throws \PhpOffice\PhpSpreadsheet\Exception */ public function export($export, string $writerType): TemporaryFile { $this->open($export); $sheetExports = [$export]; if ($export instanceof WithMultipleSheets) { $sheetExports = $export->sheets(); } foreach ($sheetExports as $sheetExport) { $this->addNewSheet()->export($sheetExport); } return $this->write($export, $this->temporaryFileFactory->makeLocal(null, strtolower($writerType)), $writerType); } /** * @param object $export * @return $this */ public function open($export) { $this->exportable = $export; if ($export instanceof WithEvents) { $this->registerListeners($export->registerEvents()); } $this->exportable = $export; $this->spreadsheet = new Spreadsheet; $this->spreadsheet->disconnectWorksheets(); if ($export instanceof WithCustomValueBinder) { Cell::setValueBinder($export); } $this->handleDocumentProperties($export); if ($export instanceof WithBackgroundColor) { $defaultStyle = $this->spreadsheet->getDefaultStyle(); $backgroundColor = $export->backgroundColor(); if (is_string($backgroundColor)) { $defaultStyle->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setRGB($backgroundColor); } if (is_array($backgroundColor)) { $defaultStyle->applyFromArray(['fill' => $backgroundColor]); } if ($backgroundColor instanceof Color) { $defaultStyle->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor($backgroundColor); } } if ($export instanceof WithDefaultStyles) { $defaultStyle = $this->spreadsheet->getDefaultStyle(); $styles = $export->defaultStyles($defaultStyle); if (is_array($styles)) { $defaultStyle->applyFromArray($styles); } } $this->raise(new BeforeExport($this, $this->exportable)); return $this; } /** * @param TemporaryFile $tempFile * @param string $writerType * @return Writer * * @throws \PhpOffice\PhpSpreadsheet\Reader\Exception */ public function reopen(TemporaryFile $tempFile, string $writerType) { $reader = IOFactory::createReader($writerType); $this->spreadsheet = $reader->load($tempFile->sync()->getLocalPath()); return $this; } /** * @param object $export * @param TemporaryFile $temporaryFile * @param string $writerType * @return TemporaryFile * * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception * @throws \PhpOffice\PhpSpreadsheet\Exception */ public function write($export, TemporaryFile $temporaryFile, string $writerType): TemporaryFile { $this->exportable = $export; $this->spreadsheet->setActiveSheetIndex(0); $this->raise(new BeforeWriting($this, $this->exportable)); $writer = WriterFactory::make( $writerType, $this->spreadsheet, $export ); if ($temporaryFile instanceof RemoteTemporaryFile && !$temporaryFile->existsLocally()) { $temporaryFile = resolve(TemporaryFileFactory::class) ->makeLocal(Arr::last(explode('/', $temporaryFile->getLocalPath()))); } $writer->save( $temporaryFile->getLocalPath() ); if ($temporaryFile instanceof RemoteTemporaryFile) { $temporaryFile->updateRemote(); $temporaryFile->deleteLocalCopy(); } $this->clearListeners(); $this->spreadsheet->disconnectWorksheets(); unset($this->spreadsheet); return $temporaryFile; } /** * @param int|null $sheetIndex * @return Sheet * * @throws \PhpOffice\PhpSpreadsheet\Exception */ public function addNewSheet(int $sheetIndex = null) { return new Sheet($this->spreadsheet->createSheet($sheetIndex)); } /** * @return Spreadsheet */ public function getDelegate() { return $this->spreadsheet; } /** * @return $this */ public function setDefaultValueBinder() { Cell::setValueBinder( app(config('excel.value_binder.default', DefaultValueBinder::class)) ); return $this; } /** * @param int $sheetIndex * @return Sheet * * @throws \PhpOffice\PhpSpreadsheet\Exception */ public function getSheetByIndex(int $sheetIndex) { return new Sheet($this->getDelegate()->getSheet($sheetIndex)); } /** * @param string $concern * @return bool */ public function hasConcern($concern): bool { return $this->exportable instanceof $concern; } /** * @param object $export */ protected function handleDocumentProperties($export) { $properties = config('excel.exports.properties', []); if ($export instanceof WithProperties) { $properties = array_merge($properties, $export->properties()); } if ($export instanceof WithTitle) { $properties = array_merge($properties, ['title' => $export->title()]); } $props = $this->spreadsheet->getProperties(); foreach (array_filter($properties) as $property => $value) { switch ($property) { case 'title': $props->setTitle($value); break; case 'description': $props->setDescription($value); break; case 'creator': $props->setCreator($value); break; case 'lastModifiedBy': $props->setLastModifiedBy($value); break; case 'subject': $props->setSubject($value); break; case 'keywords': $props->setKeywords($value); break; case 'category': $props->setCategory($value); break; case 'manager': $props->setManager($value); break; case 'company': $props->setCompany($value); break; } } } } PK ��)[�2�? ? excel/src/SettingsProvider.phpnu �[��� <?php namespace Maatwebsite\Excel; use Maatwebsite\Excel\Cache\CacheManager; use PhpOffice\PhpSpreadsheet\Settings; class SettingsProvider { /** * @var CacheManager */ private $cache; public function __construct(CacheManager $cache) { $this->cache = $cache; } /** * Provide PhpSpreadsheet settings. */ public function provide() { $this->configureCellCaching(); } protected function configureCellCaching() { Settings::setCache( $this->cache->driver() ); } } PK ��)["��� � - excel/src/Transactions/TransactionHandler.phpnu �[��� <?php namespace Maatwebsite\Excel\Transactions; interface TransactionHandler { /** * @param callable $callback * @return mixed */ public function __invoke(callable $callback); } PK ��)[�x�~ ~ / excel/src/Transactions/DbTransactionHandler.phpnu �[��� <?php namespace Maatwebsite\Excel\Transactions; use Illuminate\Database\ConnectionInterface; class DbTransactionHandler implements TransactionHandler { /** * @var ConnectionInterface */ private $connection; /** * @param ConnectionInterface $connection */ public function __construct(ConnectionInterface $connection) { $this->connection = $connection; } /** * @param callable $callback * @return mixed * * @throws \Throwable */ public function __invoke(callable $callback) { return $this->connection->transaction($callback); } } PK ��)[�y� � - excel/src/Transactions/TransactionManager.phpnu �[��� <?php namespace Maatwebsite\Excel\Transactions; use Illuminate\Support\Facades\DB; use Illuminate\Support\Manager; class TransactionManager extends Manager { /** * @return string */ public function getDefaultDriver() { return config('excel.transactions.handler'); } /** * @return NullTransactionHandler */ public function createNullDriver() { return new NullTransactionHandler(); } /** * @return DbTransactionHandler */ public function createDbDriver() { return new DbTransactionHandler( DB::connection(config('excel.transactions.db.connection')) ); } } PK ��)[Y�u 1 excel/src/Transactions/NullTransactionHandler.phpnu �[��� <?php namespace Maatwebsite\Excel\Transactions; class NullTransactionHandler implements TransactionHandler { /** * @param callable $callback * @return mixed */ public function __invoke(callable $callback) { return $callback(); } } PK ��)[v�>7� � excel/src/Exporter.phpnu �[��� <?php namespace Maatwebsite\Excel; interface Exporter { /** * @param object $export * @param string|null $fileName * @param string $writerType * @param array $headers * @return \Symfony\Component\HttpFoundation\BinaryFileResponse * * @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function download($export, string $fileName, string $writerType = null, array $headers = []); /** * @param object $export * @param string $filePath * @param string|null $diskName * @param string $writerType * @param mixed $diskOptions * @return bool * * @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function store($export, string $filePath, string $disk = null, string $writerType = null, $diskOptions = []); /** * @param object $export * @param string $filePath * @param string|null $disk * @param string $writerType * @param mixed $diskOptions * @return \Illuminate\Foundation\Bus\PendingDispatch */ public function queue($export, string $filePath, string $disk = null, string $writerType = null, $diskOptions = []); /** * @param object $export * @param string $writerType * @return string */ public function raw($export, string $writerType); } PK ��)[���� � &