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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?