efureev/dsn 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

efureev/dsn

最新稳定版本:v1.0.1

Composer 安装命令:

composer require efureev/dsn

包简介

DSN Parser

README 文档

README

PHP Package Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require Dependents

Description

There is no official DSN RFC. We have defined a DSN configuration string as using the following definition. The "URL looking" parts of a DSN is based from RFC 3986.

Kinds

String DSN

Template: <scheme>://<username>:<password>@<host>:<port>/<database>

  • http://localhost
  • localhost:8080
  • https://examlple.com
  • examlple.com
  • http://127.0.0.1/foo/bar?key=value
  • memcached://127.0.0.1
  • memcached:///var/local/run/memcached.socket?weight=25
  • mysql://john:pass@localhost:3306/my_db
  • scheme:///var/local/run/memcached.socket?weight=25

Parameters DSN

Template: <scheme>:host=<host>;port=<port>;dbname=<database>

  • mysql:host=localhost;dbname=example
  • ocdb://?Driver=ODBC+Driver+13+for+SQL+Server&server=localhost&database=WideWorldImporters&trusted_connection=Yes

Install

For php >= 8.2

composer require efureev/dsn "^1.0"

Test

composer test

统计信息

  • 总下载量: 2.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-26