首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Collection (interface)

(没有可用的版本信息,可能只在Git中)

集合是基本接口,涵盖了该库中所有数据结构的通用功能。它保证所有结构都是可遍历的,可数的,并且可以使用json_encode()将其转换为json。

接口简介

Ds\Collection implements Traversable , Countable , JsonSerializable {

/* Methods */

代码语言:javascript
复制
abstract public void clear ( void )
代码语言:javascript
复制
abstract public Ds\Collection copy ( void )
代码语言:javascript
复制
abstract public bool isEmpty ( void )
代码语言:javascript
复制
abstract public array toArray ( void )

}

Table of Contents

  • Ds\Collection::clear — Removes all values.
  • Ds\Collection::copy — Returns a shallow copy of the collection.
  • Ds\Collection::isEmpty — Returns whether the collection is empty
  • Ds\Collection::toArray — Converts the collection to an array.

Ds\Collection::clear →

扫码关注腾讯云开发者

领取腾讯云代金券