Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcGraphChartDataContainer

Graph::ezcGraphChartDataContainer

Class ezcGraphChartDataContainer

Container class for datasets used by the chart classes. Implements usefull interfaces for convenient access to the datasets.

Source for this file: /Graph/src/data_container/base.php

Implements interfaces:

  • ArrayAccess (internal interface)
  • Iterator (internal interface)
  • Countable (internal interface)
Version:   //autogentag//

Descendants

Child Class Description
ezcGraphChartSingleDataContainer Container class for datasets, which ensures, that only one dataset is used.

Member Variables

protected ezcGraphChart $chart
Chart using this data set storage
protected array(ezcGraphDataSet) $data = array()
Contains the data of a chart

Method Summary

protected ezcGraphDataSet addDataSet( $name , $dataSet , $values )
Adds a dataset to the charts data
public int count( )
Returns the number of datasets in the row.
public ezcGraphDataSet current( )
Returns the currently selected dataset.
public int key( )
Returns the key of the currently selected dataset.
public mixed next( )
Returns the next dataset and selects it or false on the last dataset.
public bool offsetExists( $key )
Returns if the given offset exists.
public ezcGraphDataSet offsetGet( $key )
Returns the element with the given offset.
public void offsetSet( $key , $value )
Set the element with the given offset.
public void offsetUnset( $key )
Unset the element with the given offset.
public ezcGraphDataSet rewind( )
Selects the very first dataset and returns it.
public bool valid( )
Returns if the current dataset is valid.

Methods

addDataSet

ezcGraphDataSet addDataSet( string $name , ezcGraphDataSet $dataSet , mixed $values )

Adds a dataset to the charts data

Parameters:
Name Type Description
$name string Name of dataset
$dataSet ezcGraphDataSet
$values mixed Values to create dataset with
Exceptions:
Type Description
ezcGraphTooManyDataSetExceptions If too many datasets are created
Redefined in descendants as:
Method Description
ezcGraphChartSingleDataContainer::addDataSet() Adds a dataset to the charts data 

count

int count( )

Returns the number of datasets in the row.

This method is part of the Countable interface to allow the usage of PHP's count() function to check how many datasets exist.

Implementation of:
Method Description
Countable::count

current

ezcGraphDataSet current( )

Returns the currently selected dataset.

This method is part of the Iterator interface to allow access to the datasets of this row by iterating over it like an array (e.g. using foreach).

Implementation of:
Method Description
Iterator::current

key

int key( )

Returns the key of the currently selected dataset.

This method is part of the Iterator interface to allow access to the datasets of this row by iterating over it like an array (e.g. using foreach).

Implementation of:
Method Description
Iterator::key

next

mixed next( )

Returns the next dataset and selects it or false on the last dataset.

This method is part of the Iterator interface to allow access to the datasets of this row by iterating over it like an array (e.g. using foreach).

Implementation of:
Method Description
Iterator::next

offsetExists

bool offsetExists( string $key )

Returns if the given offset exists.

This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.

Parameters:
Name Type Description
$key string Identifier of dataset.
Implementation of:
Method Description
ArrayAccess::offsetExists

offsetGet

ezcGraphDataSet offsetGet( string $key )

Returns the element with the given offset.

This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.

Parameters:
Name Type Description
$key string Identifier of dataset.
Exceptions:
Type Description
ezcGraphNoSuchDataSetException If no dataset with identifier exists
Implementation of:
Method Description
ArrayAccess::offsetGet

offsetSet

void offsetSet( string $key , ezcGraphDataSet $value )

Set the element with the given offset.

This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.

Parameters:
Name Type Description
$key string
$value ezcGraphDataSet
Exceptions:
Type Description
ezcBaseValueException If supplied value is not an ezcGraphDataSet
Implementation of:
Method Description
ArrayAccess::offsetSet

offsetUnset

void offsetUnset( string $key )

Unset the element with the given offset.

This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.

Parameters:
Name Type Description
$key string
Implementation of:
Method Description
ArrayAccess::offsetUnset

rewind

ezcGraphDataSet rewind( )

Selects the very first dataset and returns it.

This method is part of the Iterator interface to allow access to the datasets of this row by iterating over it like an array (e.g. using foreach).

Implementation of:
Method Description
Iterator::rewind

valid

bool valid( )

Returns if the current dataset is valid.

This method is part of the Iterator interface to allow access to the datasets of this row by iterating over it like an array (e.g. using foreach).

Implementation of:
Method Description
Iterator::valid
Documentation generated by phpDocumentor 1.4.3