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

Class: DataContainer

Source Location: /classes/datacontainer.class.php

Class Overview


Container of any number of data items.


Variables

Methods


Child classes:

Post
Contains a post, composed of several data fields/items. Has extended functionality specific to it's purpose as a container of not just data, but data composing a blogpost.

Class Details

[line 13]
Container of any number of data items.



[ Top ]


Class Variables

$items =

[line 15]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 20]

DataContainer __construct( )

Initializes private item variable to an array.



Overridden in child classes as:

Post::__construct()
Constructor, calls constructor of parent DataContainer.

[ Top ]

method AddItem [line 31]

void AddItem( string $k, string $v)

Adds item to container.



Parameters:

string   $k   Key to add.
string   $v   Value to associate with key.

[ Top ]

method DeleteItem [line 84]

void DeleteItem( string $k)

Removes item with the specified key.



Parameters:

string   $k   Key to remove.

[ Top ]

method EditItem [line 63]

bool EditItem( string $k, string $value)

Edits the value associated with specified key.



Tags:

return:  True on success and false if key does not exist.


Parameters:

string   $k   Key of item to edit.
string   $value   New value of item.

[ Top ]

method GetValue [line 42]

void GetValue( string $k)

Gets value associated with specified key.



Parameters:

string   $k   Key to request.

[ Top ]


Documentation generated on Mon, 26 May 2008 19:59:42 +0100 by phpDocumentor 1.4.0