Class Set (namespace Nette\Collections)


Provides the base class for a collection that contains no duplicate elements.

ArrayObject
   |
   --Collection
      |
      --Set

Implements interfaces:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Collections/Set.php (line 36)
Public Method Summary
bool
append (mixed $item)
Appends the specified element to the end of this collection.
void
offsetExists ($key)
Not supported.
void
offsetGet ($key)
Not supported.
void
offsetSet ($key, $item)
Not supported (only appending).
void
offsetUnset ($key)
Not supported.
Protected Method Summary
protected int|FALSE
search (mixed $item)
Returns the index of the first occurrence of the specified element, or FALSE if this collection does not contain this element.
Methods Inherited From Collection
__construct(), append(), beforeAdd(), beforeRemove(), clear(), contains(), exchangeArray(), getClass(), getIterator(), import(), isReadOnly(), remove(), search(), setArray(), setReadOnly(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary

Method Details

line 46

append

public bool append (mixed $item)

Appends the specified element to the end of this collection.

Implementation of:

Input
mixed $item
Output
bool true if this collection changed as a result of the call
Throws
throws InvalidArgumentException, \NotSupportedException

line 121

offsetExists

public void offsetExists ($key)

Not supported.

Input
$key
Output
void  

line 111

offsetGet

public void offsetGet ($key)

Not supported.

Input
$key
Output
void  

line 97

offsetSet

public void offsetSet ($key, $item)

Not supported (only appending).

Input
$key
$item
Output
void  

line 131

offsetUnset

public void offsetUnset ($key)

Not supported.

Input
$key
Output
void  

line 77

search

protected int|FALSE search (mixed $item)

Returns the index of the first occurrence of the specified element, or FALSE if this collection does not contain this element.

Input
mixed $item
Output
int|FALSE  
Throws
throws InvalidArgumentException