定制 alxarafe/resource-pdo 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

alxarafe/resource-pdo

最新稳定版本:0.1.1

Composer 安装命令:

composer require alxarafe/resource-pdo

包简介

PDO adapter for alxarafe/resource-controller. Implements RepositoryContract, QueryContract, and TransactionContract using native PDO.

README 文档

README

PHP Version CI Tests Static Analysis PRs Welcome

Native PDO adapter for alxarafe/resource-controller.

Implements RepositoryContract, QueryContract, and TransactionContract using pure PHP PDO, without relying on ORMs or heavy database libraries.

Ecosystem

Package Purpose Status
resource-controller Core CRUD engine + UI components ✅ Stable
resource-eloquent Eloquent ORM adapter ✅ Stable
resource-pdo Native PDO adapter ✅ Stable
resource-blade Blade template renderer adapter ✅ Stable
resource-twig Twig template renderer adapter ✅ Stable
resource-html Pure PHP/HTML template renderer adapter ✅ Stable

Installation

composer require alxarafe/resource-pdo

Usage

use Alxarafe\ResourceController\AbstractResourceController;
use Alxarafe\ResourceController\Contracts\RepositoryContract;
use Alxarafe\ResourceController\Contracts\TransactionContract;
use Alxarafe\ResourcePdo\PdoRepository;
use Alxarafe\ResourcePdo\PdoTransaction;

class UsersController extends AbstractResourceController
{
    private \PDO $pdo;

    public function __construct(\PDO $pdo) {
        $this->pdo = $pdo;
    }

    protected function getRepository(string $tabId = 'default'): RepositoryContract
    {
        return new PdoRepository($this->pdo, 'users', 'id');
    }

    protected function getTransaction(): TransactionContract
    {
        return new PdoTransaction($this->pdo);
    }
}

Features

  • Dependency-free database access using native PHP \PDO.
  • Fast, secure, and prepared statements out-of-the-box.
  • Seamless compatibility with alxarafe/resource-controller configuration array definitions.

License

GPL-3.0-or-later

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固