yii2-collection

Collection extension for Yii 2

  • 所有者: yiisoft/yii2-collection
  • 平台:
  • 许可证: BSD 3-Clause "New" or "Revised" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

This extension provides a generic data collection as well as a collection for the ActiveRecord DB layer of Yii 2.

Development is currently in experimental state. It is not ready for production use and may change significantly.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version
Total Downloads
Build Status

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-collection

or add

"yiisoft/yii2-collection": "~1.0.0"

to the require section of your composer.json.

Configuration

To use this extension, you have to attach the yii\collection\CollectionBehavior to the ActiveQuery instance of
your ActiveRecord classes by overriding the find() method:

/**
 * {@inheritdoc}
 * @return \yii\db\ActiveQuery, \yii\collection\CollectionBehavior
 */
public static function find()
{
    $query = parent::find();
    $query->attachBehavior('collection', \yii\collection\CollectionBehavior::class);
    return $query;
}

主要指标

概览
名称与所有者yiisoft/yii2-collection
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2017-06-06 09:53:15
推送于2024-01-31 08:51:57
最后一次提交2024-01-31 09:51:57
发布数0
用户参与
星数67
关注者数26
派生数18
提交数35
已启用问题?
问题数20
打开的问题数9
拉请求数13
打开的拉请求数1
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?