Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
06
/
wp-content
/
plugins
/
the-events-calendar
/
common
/
src
/
Tribe
/
Utils
:
Collection_Interface.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * A class providing collection methods. * * For convenience classes implementing this interface should `use Collection_Trait` and implement just the `all` * method. * * @since 4.9.14 * @package Tribe\Utils */ namespace Tribe\Utils; /** * Interface Collection_Interface * @since 4.9.14 * @package Tribe\Utils */ interface Collection_Interface extends \ArrayAccess, \SeekableIterator, \Countable, \Serializable, \JsonSerializable { /** * Returns all the items in the collection. * * @since 4.9.14 * * @return array All the items in the collection. */ public function all(); /** * Returns the first item in the collection. * * @since 4.9.14 * * @return mixed The first item in the collection. */ public function first(); /** * Returns the last item in the collection. * * @since 4.9.14 * * @return mixed The last item in the collection. */ public function last(); /** * Returns the nth item in the collection. * * @since 4.9.14 * * @param int $n The 1-based index of the item to return. It's not 0-based, `1` will return the first item. * * @return mixed|null The nth item in the collection or `null` if not set. */ public function nth( $n ); }