Sgss_Collection_Map_Abstract 
Abstract class for associated collection between keys and values

Description

Implements:
Sgss_Collection_Map_Interface
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Collection/Map/Abstract.php (line 51)

Direct descendants

Sgss_Collection_Array_Map Represents an associated collection array between keys and values
Sgss_Collection_Pdo_Map Represents an associated collection in database table

Class overview

Methods

int count ()
boolean hasAll (array|object $keys)

Determines whether this map contains the associated values with the keys inside the specified object

boolean hasAllValues (array|object $values)

Determines whether this map contains all the values in the specified object

boolean isEmpty ()

Determines whether this map contains no association

boolean offsetExists (mixed $offset)
mixed offsetGet (mixed $offset)
mixed offsetSet (mixed $offset, mixed $value)
void offsetUnset (mixed $offset)
boolean putAll (array|object $map, array|object $t)

Inserts or replaces the associations between all the keys and the associated values in the specified object into this map

boolean removeAll (array|object $keys)

Removes all the keys and the associated values in the specified object from this map

boolean set (mixed $key, mixed $value)

Alias of put()

mixed __get (mixed $name)
boolean __isset (mixed $name)
mixed __set (mixed $name, mixed $value)
void __unset (mixed $name)

Method detail

count

Uses:
Sgss_Collection_Map_Interface::size()
Related subject:
Countable::count()
Signature:
public int count ()


hasAll

Determines whether this map contains the associated values with the keys inside the specified object

Parameters:
  • array|object $keys

    Object containing keys to determine

Returns:
boolean -- True when this map contains all the associated value in the object
Throws:
  • Sgss_Collection_Map_Exception

    When the specified object is untraversable

Specified by:
Uses:
Sgss_Collection_Map_Interface::has()
Related subject:
Sgss_Collection_Map_Interface::hasAll()
Signature:
public boolean hasAll (array|object $keys)


hasAllValues

Determines whether this map contains all the values in the specified object

Parameters:
  • array|object $values

    Object containing values to determine

Returns:
boolean -- True when this map contains all the values in the object
Throws:
  • Sgss_Collection_Map_Exception

    When the specified object is untraversable

Specified by:
Uses:
Sgss_Collection_Map_Interface::hasValue()
Related subject:
Sgss_Collection_Map_Interface::hasAllValues()
Signature:
public boolean hasAllValues (array|object $values)


isEmpty

Determines whether this map contains no association

Returns:
boolean -- True when this map contains no association
Specified by:
Uses:
Sgss_Collection_Map_Interface::size()
Related subject:
Sgss_Collection_Map_Interface::isEmpty()
Signature:
public boolean isEmpty ()


offsetExists

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_Map_Interface::has()
Related subject:
ArrayAccess::offsetExists()
Signature:
public boolean offsetExists (mixed $offset)


offsetGet

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_Map_Interface::get()
Related subject:
ArrayAccess::offsetGet()
Signature:
public mixed offsetGet (mixed $offset)


offsetSet

Parameters:
  • mixed $offset
  • mixed $value
Uses:
Sgss_Collection_Map_Interface::put()
Related subject:
ArrayAccess::offsetSet()
Signature:
public mixed offsetSet (mixed $offset, mixed $value)


offsetUnset

Parameters:
  • mixed $offset
Uses:
Sgss_Collection_Map_Interface::remove()
Related subject:
ArrayAccess::offsetUnset()
Signature:
public void offsetUnset (mixed $offset)


putAll

Inserts or replaces the associations between all the keys and the associated values in the specified object into this map

Parameters:
  • array|object $t

    Object containing keys and the asscociated values to be inserted

  • $map
Returns:
boolean -- True when the operation changed this map
Throws:
  • Sgss_Collection_Map_Exception

    When the specified object is untraversable

Specified by:
Uses:
Sgss_Collection_Map_Interface::put()
Used by:
Sgss_Collection_Array_Map::__construct()
Related subject:
Sgss_Collection_Map_Interface::putAll()
Signature:
public boolean putAll (array|object $map, array|object $t)


removeAll

Removes all the keys and the associated values in the specified object from this map

Parameters:
  • array|object $keys

    Object containing keys to associated with the values to be removed

Returns:
boolean -- True when the operation changed this list
Throws:
  • Sgss_Collection_Map_Exception

    When the specified object is untraversable

Specified by:
Uses:
Sgss_Collection_Map_Interface::remove()
Related subject:
Sgss_Collection_Map_Interface::removeAll()
Signature:
public boolean removeAll (array|object $keys)


set

Alias of put()

Parameters:
  • mixed $key

    Key to be inserted

  • mixed $value

    Value to be inserted and associated with the key

Returns:
boolean -- True when the operation changed this map
Specified by:
Uses:
Sgss_Collection_Map_Interface::put()
Related subject:
Sgss_Collection_Map_Interface::set()
Signature:
public boolean set (mixed $key, mixed $value)


__get

Parameters:
  • mixed $name
Specified by:
Uses:
Sgss_Collection_Map_Interface::get()
Related subject:
Sgss_Collection_Map_Interface::__get()
Signature:
public mixed __get (mixed $name)


__isset

Parameters:
  • mixed $name
Specified by:
Uses:
Sgss_Collection_Map_Interface::has()
Related subject:
Sgss_Collection_Map_Interface::__isset()
Signature:
public boolean __isset (mixed $name)


__set

Parameters:
  • mixed $name
  • mixed $value
Specified by:
Uses:
Sgss_Collection_Map_Interface::put()
Related subject:
Sgss_Collection_Map_Interface::__set()
Signature:
public mixed __set (mixed $name, mixed $value)


__unset

Parameters:
  • mixed $name
Specified by:
Uses:
Sgss_Collection_Map_Interface::remove()
Related subject:
Sgss_Collection_Map_Interface::__unset()
Signature:
public void __unset (mixed $name)