在线文档教程
PHP
数据结构 | Data Structures

Collection (interface)

Collection 接口

介绍

Ds\Collection implements Traversable , Countable , JsonSerializable {

/* Methods */

abstract public void clear ( void )

abstract public Ds\Collection copy ( void )

abstract public bool isEmpty ( void )

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.

← Examples

Ds\Collection::clear →