Autarky\Config\ConfigInterface::get PHP Метод

get() публичный Метод

Get an item from the store.
public get ( string $key, mixed $default = null ) : mixed
$key string
$default mixed If the value is not found, return this instead.
Результат mixed
    public function get($key, $default = null);

Usage Example

Пример #1
0
 /**
  * Get the configuration array for a specific connection.
  *
  * @param  string $connection The name of the connection.
  *
  * @return array
  *
  * @throws \InvalidArgumentException If connection is not defined
  */
 public function getConnectionConfig($connection = null)
 {
     if ($connection === null) {
         $connection = $this->defaultConnection;
     }
     $config = $this->config->get("database.connections.{$connection}");
     if (!$config) {
         if (!is_string($connection)) {
             $connection = gettype($connection);
         }
         throw new \InvalidArgumentException("No config found for connection: {$connection}");
     }
     return $config;
 }
All Usage Examples Of Autarky\Config\ConfigInterface::get