!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/vendor/openspout/openspout/src/Writer/   drwxr-xr-x
Free 28.53 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AbstractWriterMultiSheets.php (3.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
OpenSpout\Writer;

use 
OpenSpout\Common\Entity\Row;
use 
OpenSpout\Common\Exception\IOException;
use 
OpenSpout\Writer\Common\Entity\Sheet;
use 
OpenSpout\Writer\Common\Manager\WorkbookManagerInterface;
use 
OpenSpout\Writer\Exception\SheetNotFoundException;
use 
OpenSpout\Writer\Exception\WriterNotOpenedException;

abstract class 
AbstractWriterMultiSheets extends AbstractWriter
{
    private 
WorkbookManagerInterface $workbookManager;

    
/**
     * Returns all the workbook's sheets.
     *
     * @return Sheet[] All the workbook's sheets
     *
     * @throws WriterNotOpenedException If the writer has not been opened yet
     */
    
final public function getSheets(): array
    {
        
$this->throwIfWorkbookIsNotAvailable();

        
$externalSheets = [];
        
$worksheets $this->workbookManager->getWorksheets();

        foreach (
$worksheets as $worksheet) {
            
$externalSheets[] = $worksheet->getExternalSheet();
        }

        return 
$externalSheets;
    }

    
/**
     * Creates a new sheet and make it the current sheet. The data will now be written to this sheet.
     *
     * @return Sheet The created sheet
     *
     * @throws IOException
     * @throws WriterNotOpenedException If the writer has not been opened yet
     */
    
final public function addNewSheetAndMakeItCurrent(): Sheet
    
{
        
$this->throwIfWorkbookIsNotAvailable();
        
$worksheet $this->workbookManager->addNewSheetAndMakeItCurrent();

        return 
$worksheet->getExternalSheet();
    }

    
/**
     * Returns the current sheet.
     *
     * @return Sheet The current sheet
     *
     * @throws WriterNotOpenedException If the writer has not been opened yet
     */
    
final public function getCurrentSheet(): Sheet
    
{
        
$this->throwIfWorkbookIsNotAvailable();

        return 
$this->workbookManager->getCurrentWorksheet()->getExternalSheet();
    }

    
/**
     * Sets the given sheet as the current one. New data will be written to this sheet.
     * The writing will resume where it stopped (i.e. data won't be truncated).
     *
     * @param Sheet $sheet The sheet to set as current
     *
     * @throws SheetNotFoundException   If the given sheet does not exist in the workbook
     * @throws WriterNotOpenedException If the writer has not been opened yet
     */
    
final public function setCurrentSheet(Sheet $sheet): void
    
{
        
$this->throwIfWorkbookIsNotAvailable();
        
$this->workbookManager->setCurrentSheet($sheet);
    }

    abstract protected function 
createWorkbookManager(): WorkbookManagerInterface;

    protected function 
openWriter(): void
    
{
        if (!isset(
$this->workbookManager)) {
            
$this->workbookManager $this->createWorkbookManager();
            
$this->workbookManager->addNewSheetAndMakeItCurrent();
        }
    }

    
/**
     * @throws Exception\WriterException
     */
    
protected function addRowToWriter(Row $row): void
    
{
        
$this->throwIfWorkbookIsNotAvailable();
        
$this->workbookManager->addRowToCurrentWorksheet($row);
    }

    protected function 
closeWriter(): void
    
{
        if (isset(
$this->workbookManager)) {
            
$this->workbookManager->close($this->filePointer);
        }
    }

    
/**
     * Checks if the workbook has been created. Throws an exception if not created yet.
     *
     * @throws WriterNotOpenedException If the workbook is not created yet
     */
    
private function throwIfWorkbookIsNotAvailable(): void
    
{
        if (!isset(
$this->workbookManager)) {
            throw new 
WriterNotOpenedException('The writer must be opened before performing this action.');
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.01 ]--