Koowa_Object
[ class tree: Koowa_Object ] [ index: Koowa_Object ] [ all elements ]

Class: KObjectSet

Source Location: /libraries/koowa/object/set.php

Class Overview

KObject
   |
   --KObjectSet

An Object Set Class


Author(s):

Implements interfaces:

  • Iterator (internal interface)
  • ArrayAccess (internal interface)
  • Countable (internal interface)
  • Serializable (internal interface)

Variables

Methods


Child classes:

KDatabaseRowsetAbstract
Abstract Rowset Class

Inherited Variables

Inherited Methods

Class: KObject

KObject::__construct()
Constructor
KObject::get()
Get the object properties
KObject::getHandle()
Get a handle for this object
KObject::getIdentifier()
Gets the service identifier.
KObject::getMethods()
Get a list of all the available methods
KObject::getService()
Get an instance of a class based on a class identifier only creating it if it does not exist yet.
KObject::inherits()
Checks if the object or one of it's mixin's inherits from a class.
KObject::mixin()
Mixin an object
KObject::set()
Set the object properties
KObject::_initialize()
Initializes the options for the object
KObject::__call()
Search the mixin method map and call the method or trigger an error
KObject::__clone()
Preform a deep clone of the object.

Class Details

[line 20]
An Object Set Class

KObjectSet implements an associative container that stores objects, and in which the object themselves are the keys. Objects are stored in the set in FIFO order.




Tags:



[ Top ]


Class Variables

$_object_set =  null

[line 27]

Object set



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 35]

\KObjectSet __construct( [ $config = null])

Constructor



Tags:

access:  public


Overridden in child classes as:

KDatabaseRowsetAbstract::__construct()
Constructor
KDatabaseRowsetTable::__construct()
Constructor

Overrides KObject::__construct() (Constructor)

Parameters:

KConfig|null   $config   An optional KConfig object with configuration options

[ Top ]

method contains [line 90]

bool contains( KObjectHandlable $object)

Checks if the set contains a specific object



Tags:

return:  Returns TRUE if the object is in the set, FALSE otherwise
access:  public


Parameters:

KObjectHandlable   $object  

[ Top ]

method count [line 216]

int count( )

Returns the number of elements in the collection.

Required by the Countable interface




Tags:

access:  public



Implementation of:
Countable::count
[ Top ]

method current [line 284]

mixed current( )

Return the current element



Tags:

access:  public



Implementation of:
Iterator::current
[ Top ]

method extract [line 73]

KObjectQueue extract( KObjectHandlable $object)

Removes an object from the set

All numerical array keys will be modified to start counting from zero while literal keys won't be touched.




Tags:

access:  public


Overridden in child classes as:

KDatabaseRowsetAbstract::extract()
Removes a row from the rowset

Parameters:

KObjectHandlable   $object  

[ Top ]

method getIterator [line 243]

\ArrayIterator getIterator( )

Defined by IteratorAggregate



Tags:

access:  public


[ Top ]

method insert [line 51]

boolean insert( KObjectHandlable $object)

Inserts an object in the set



Tags:

return:  TRUE on success FALSE on failure
access:  public


Overridden in child classes as:

KDatabaseRowsetAbstract::insert()
Insert a row into the rowset

Parameters:

KObjectHandlable   $object  

[ Top ]

method key [line 274]

mixed key( )

Return the key of the current element



Tags:

access:  public



Implementation of:
Iterator::key
[ Top ]

method merge [line 101]

KObjectQueue merge( KObjectSet $set)

Merge-in another object set



Tags:

access:  public


Parameters:

KObjectSet   $set  

[ Top ]

method next [line 294]

void next( )

Move forward to next element



Tags:

access:  public



Implementation of:
Iterator::next
[ Top ]

method offsetExists [line 119]

bool offsetExists( KObjectHandlable $object)

Check if the object exists in the queue

Required by interface ArrayAccess




Tags:

return:  Returns TRUE if the object exists in the storage, and FALSE otherwise
throws:  InvalidArgumentException if the object doesn't implement KObjectHandlable
access:  public



Implementation of:
ArrayAccess::offsetExists

Parameters:

KObjectHandlable   $object  

[ Top ]

method offsetGet [line 137]

KObjectHandlable offsetGet( KObjectHandlable $object)

Returns the object from the set

Required by interface ArrayAccess




Tags:

throws:  InvalidArgumentException if the object doesn't implement KObjectHandlable
access:  public



Implementation of:
ArrayAccess::offsetGet

Parameters:

KObjectHandlable   $object  

[ Top ]

method offsetSet [line 156]

\KObjectSet offsetSet( KObjectHandlable $object, mixed $data)

Store an object in the set

Required by interface ArrayAccess




Tags:

throws:  InvalidArgumentException if the object doesn't implement KObjectHandlable
access:  public



Implementation of:
ArrayAccess::offsetSet

Parameters:

KObjectHandlable   $object  
mixed   $data   The data to associate with the object [UNUSED]

[ Top ]

method offsetUnset [line 175]

\KObjectSet offsetUnset( KObjectHandlable $object)

Removes an object from the set

Required by interface ArrayAccess




Tags:

throws:  InvalidArgumentException if the object doesn't implement the KObjectHandlable interface
access:  public



Implementation of:
ArrayAccess::offsetUnset

Parameters:

KObjectHandlable   $object  

[ Top ]

method rewind [line 253]

\KObjectArray rewind( )

Rewind the Iterator to the first element



Tags:

access:  public



Implementation of:
Iterator::rewind
[ Top ]

method serialize [line 192]

string serialize( )

Return a string representation of the set

Required by interface Serializable




Tags:

return:  A serialized object
access:  public



Implementation of:
Serializable::serialize
[ Top ]

method toArray [line 304]

array toArray( )

Return an associative array of the data.



Tags:

access:  public


Overridden in child classes as:

KDatabaseRowsetAbstract::toArray()
Return an associative array of the data.

[ Top ]

method top [line 226]

mixed top( )

Return the first object in the set



Tags:

return:  \KObject or NULL is queue is empty
access:  public


[ Top ]

method unserialize [line 204]

void unserialize( string $serialized)

Unserializes a set from its string representation

Required by interface Serializable




Tags:

access:  public



Implementation of:
Serializable::unserialize

Parameters:

string   $serialized   The serialized data

[ Top ]

method valid [line 264]

boolean valid( )

Checks if current position is valid



Tags:

access:  public



Implementation of:
Iterator::valid
[ Top ]

method __clone [line 314]

void __clone( )

Preform a deep clone of the object



Tags:

access:  public


Overrides KObject::__clone() (Preform a deep clone of the object.)

[ Top ]


Documentation generated on Mon, 20 May 2013 03:03:34 +0200 by phpDocumentor 1.4.3