/**
  * 获取DSN链接
  *
  * @param  array  $config
  * @return string
  */
 protected function getDblibDsn(array $config)
 {
     $arguments = ['host' => $this->buildHostString($config, ':'), 'dbname' => $config['database']];
     $arguments = array_merge($arguments, Arr::only($config, ['appname', 'charset']));
     return $this->buildConnectString('dblib', $arguments);
 }
Example #2
0
 /**
  * Get a subset of the items from the given array.
  *
  * @param  array  $array
  * @param  array|string  $keys
  * @return array
  */
 function array_only($array, $keys)
 {
     return Arr::only($array, $keys);
 }
Example #3
0
 /**
  * Get the items with the specified keys.
  *
  * @param  mixed  $keys
  * @return static
  */
 public function only($keys)
 {
     $keys = is_array($keys) ? $keys : func_get_args();
     return new static(Arr::only($this->items, $keys));
 }