Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Database/Console/DatabaseInspectionCommand.php
Строк: 106
<?php

namespace IlluminateDatabaseConsole;

use 
IlluminateConsoleCommand;
use 
IlluminateDatabaseConnectionInterface;
use 
IlluminateSupportArr;

abstract class 
DatabaseInspectionCommand extends Command
{
    
/**
     * Get a human-readable name for the given connection.
     *
     * @param  IlluminateDatabaseConnectionInterface  $connection
     * @param  string  $database
     * @return string
     *
     * @deprecated
     */
    
protected function getConnectionName(ConnectionInterface $connection$database)
    {
        return 
$connection->getDriverTitle();
    }

    
/**
     * Get the number of open connections for a database.
     *
     * @param  IlluminateDatabaseConnectionInterface  $connection
     * @return int|null
     *
     * @deprecated
     */
    
protected function getConnectionCount(ConnectionInterface $connection)
    {
        return 
$connection->threadCount();
    }

    
/**
     * Get the connection configuration details for the given connection.
     *
     * @param  string|null  $database
     * @return array
     */
    
protected function getConfigFromDatabase($database)
    {
        
$database ??= config('database.default');

        return 
Arr::except(config('database.connections.'.$database), ['password']);
    }
}
Онлайн: 1
Реклама