承接 blackbonjour/doctrine-dbal-tablegateway 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

blackbonjour/doctrine-dbal-tablegateway

最新稳定版本:0.4.0

Composer 安装命令:

composer require blackbonjour/doctrine-dbal-tablegateway

包简介

Foo Bar

README 文档

README

This is just my personal playground and therefore not intended for production use.

A PHP library that implements the TableGateway pattern for Doctrine DBAL, providing a simple and efficient way to interact with database tables.

Overview

This library offers a clean, object-oriented interface for database operations using the TableGateway pattern. It wraps Doctrine DBAL to provide:

  • Simple CRUD operations (Create, Read, Update, Delete)
  • Efficient bulk operations for better performance
  • Type-safe parameter handling
  • Flexible query building
  • Support for transactions

The TableGateway pattern encapsulates the database access logic for a single table, making your code more maintainable and testable.

Requirements

  • PHP 8.3 or higher
  • Doctrine DBAL

Installation

composer require blackbonjour/doctrine-dbal-tablegateway

Basic Example

// Create a TableGateway for the "user" table
$userTable = new TableGateway($connection, 'user');

// Insert a record
$userTable->insert(['name' => 'john_doe', 'email' => 'john@example.com']);

// Select records
$users = $userTable->select('status = :status', ['status' => 'active'])->fetchAllAssociative();

// Update records
$userTable->update(['status' => 'inactive'], ['last_login < :date'], ['date' => '2023-01-01']);

// Delete records
$userTable->delete(['id' => 123]);

Documentation

For detailed information on how to use this library, please see:

License

This project is licensed under the MIT License — see the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-05