Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /home/fdshops/public_html/vendor/knuckleswtf/scribe/src/Tools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/fdshops/public_html/vendor/knuckleswtf/scribe/src/Tools/DocumentationConfig.php
<?php

namespace Knuckles\Scribe\Tools;

use Illuminate\Support\Str;
use Knuckles\Scribe\Tools\ConsoleOutputUtils as c;

class DocumentationConfig
{
    private $data;

    public function __construct(array $config = [])
    {
        $config['router'] = $this->getRouter($config);
        $this->data = $config;
    }

    /**
     * Get a config item with dot notation.
     * If the key does not exist, $default (or null) will be returned.
     *
     * @param string $key
     * @param mixed $default
     *
     * @return array|mixed
     */
    public function get(string $key, $default = null)
    {
        return data_get($this->data, $key, $default);
    }

    private function getRouter(array $config): string
    {
        if ($router = data_get($config, 'router', null)) {
            if (!in_array($router, ['dingo', 'laravel'])) {
                throw new \InvalidArgumentException("Unknown `router` config value: $router");
            }
            return $router;
        }

        if (class_exists(\Dingo\Api\Routing\Router::class)) {
            c::info('Detected Dingo API router');
            return 'dingo';
        }

        return 'laravel';

    }

    public function outputIsStatic(): bool
    {
        return !$this->outputRoutedThroughLaravel();
    }

    public function outputRoutedThroughLaravel(): bool
    {
        return Str::is(['laravel', 'external_laravel'], $this->get('type'));
    }

    public function outputIsExternal(): bool
    {
        return Str::is(['external_static', 'external_laravel'], $this->get('type'));
    }
}

Spamworldpro Mini