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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/maatwebsite/excel/src/Imports/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Maatwebsite\Excel\Imports;

use 
Maatwebsite\Excel\Concerns\WithColumnLimit;
use 
Maatwebsite\Excel\Concerns\WithHeadingRow;
use 
Maatwebsite\Excel\Concerns\WithStartRow;
use 
Maatwebsite\Excel\Row;
use 
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;

class 
HeadingRowExtractor
{
    
/**
     * @const int
     */
    
const DEFAULT_HEADING_ROW 1;

    
/**
     * @param WithHeadingRow|mixed $importable
     *
     * @return int
     */
    
public static function headingRow($importable): int
    
{
        return 
method_exists($importable'headingRow')
            ? 
$importable->headingRow()
            : 
self::DEFAULT_HEADING_ROW;
    }

    
/**
     * @param WithHeadingRow|mixed $importable
     *
     * @return int
     */
    
public static function determineStartRow($importable): int
    
{
        if (
$importable instanceof WithStartRow) {
            return 
$importable->startRow();
        }

        
// The start row is the row after the heading row if we have one!
        
return $importable instanceof WithHeadingRow
            
self::headingRow($importable) + 1
            
self::DEFAULT_HEADING_ROW;
    }

    
/**
     * @param Worksheet            $worksheet
     * @param WithHeadingRow|mixed $importable
     *
     * @return array
     */
    
public static function extract(Worksheet $worksheet$importable): array
    {
        if (!
$importable instanceof WithHeadingRow) {
            return [];
        }

        
$headingRowNumber self::headingRow($importable);
        
$rows             iterator_to_array($worksheet->getRowIterator($headingRowNumber$headingRowNumber));
        
$headingRow       head($rows);
        
$endColumn        $importable instanceof WithColumnLimit $importable->endColumn() : null;

        return 
HeadingRowFormatter::format((new Row($headingRow))->toArray(nullfalsefalse$endColumn));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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