定制 danek/grimoire-db 二次开发

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

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

danek/grimoire-db

Composer 安装命令:

composer require danek/grimoire-db

包简介

Grimoire is a PHP library for simple working with data in the database.

关键字:

README 文档

README

https://repository-images.githubusercontent.com/677257963/b1803baf-c64a-4975-98c9-9ea5f5425cfa

Grimoire is a PHP library for simple working with data in the database. The most interesting feature is a very easy work with table relationships. The overall performance is also very important and Grimoire can actually run faster than a native driver.

Contents

Requirements

  • PHP 7.1+
  • only MySQL database supported

Installation

composer require danek/grimoire-db

Usage

<?php

$connection = new \Mysqli(...);
$config = Grimoire\Config::build($connection);
$software = new Grimoire\Database($config);

foreach ($software->table('application')->order("title") as $application) { // get all applications ordered by title
    echo $application['title'] . "\n"; // print application title
    echo $application->ref('author')['name'] . "\n"; // print name of the application author
    foreach ($application->related('application_tag') as $application_tag) { // get all tags of $application
        echo $application_tag->ref('tag')['name'] . "\n"; // print the tag name
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-08-13