ExportDataInterface Interface Reference

Inheritance diagram for ExportDataInterface:
ExportData

Public Member Functions

 setLocations ($locations)
 getLocations ()
 storeLocation ($location_id)
 gotoLocation ($location_id)
 setKeys ($key)
 getKeys ($page_id=NULL)
 add ($key, $value)
 next ()
 setPointer ($index=NULL)
 getPointer ()
 setPage ($page_id)
 getAllPageIds ()
 setPageOrder ($page_id)
 get ()
 getCurrent ($key=NULL)
 getCurrentPageId ()
 getPage ($page_id)
 normalize ($empty_value)
 merge (ExportDataInterface $data, $empty_value)
 find ($value, $key=NULL, $results=1, $direction=0)

Detailed Description

Interface ExportDataInterface


Member Function Documentation

add ( key,
value 
)

Add (or Set) data to the current record

Parameters:
string $key
string $value
Returns:
$this

Implemented in ExportData.

find ( value,
key = NULL,
results = 1,
direction = 0 
)

Find a value in the dataset of the current page

Parameters:
mixed $value
mixed $key (Optional) Defaults to NULL. Set this to constrain the search by key.
int $results (Optional) Defaults to 1. The number of results to return. Enter 0 for no limit.
int $direction (Optional) Defaults to 0. 0 to search from beginning, 1 to search backward from end.
Returns:
array
  • Keys are the pointers.
  • Values are an array of fields in the current pointer

Implemented in ExportData.

get (  ) 

Get the data

Returns:
array

Implemented in ExportData.

getAllPageIds (  ) 

Return an array of all page ids

Returns:
array

Implemented in ExportData.

getCurrent ( key = NULL  ) 

Return the current record or data by key

Parameters:
string $key (Optional) Defaults to NULL. If excluded the entire current record will be returned. If included the value of the current row at $key will be returned.
Returns:
array | mixed

Implemented in ExportData.

getCurrentPageId (  ) 

Get the current page id

Returns:
mixed

Implemented in ExportData.

getKeys ( page_id = NULL  ) 

Return an array of all keys for current of specified page

Returns:
array

Implemented in ExportData.

getLocations (  ) 

Return an array of location data keyed by location_id

Returns:
array
  • keys are location_ids
  • values: arrays
    • pointers
    • page

Implemented in ExportData.

getPage ( page_id  ) 

Return a single page of data

Parameters:
mixed $page_id
Returns:
array

Implemented in ExportData.

getPointer (  ) 

Return the current pointer

Returns:
int

Implemented in ExportData.

gotoLocation ( location_id  ) 

Goto to a stored location

Parameters:
string $location_id A unique key or preset id to remember this location by. If nothing has been stored using this id, nothing happens.
Returns:
$this

Implemented in ExportData.

merge ( ExportDataInterface data,
empty_value 
)

Merge another ExportData object into this one

  • Rows will be merged by key
  • All rows will be expanded to have all columns
Parameters:
ExportData $data
mixed $empty_value
Returns:
$this
See also:
ExportData::normalize()
next (  ) 

Returns the record index and advances the record pointer

Returns:
int The index of the record that was just closed

Implemented in ExportData.

normalize ( empty_value  ) 

Normalize all rows so that they all contain the same number of columns, the column order will be taken from the order of the first column

Parameters:
array|mixed $empty_value If this is an array then you may provide default values by column key, as well as the special key `default` which is the default value for any column whose key is not present in $empty_value. If this is not an array, then the value will be used for all empty values of all columns, rows, cells, etc.
Returns:
$this

Implemented in ExportData.

setKeys ( key  ) 

Set the data key order for the current page

Parameters:
array|mixed $key

  • If this is an array, it will be taken as the key order
  • Or, you can list individual keys in correct order as function arguments
Returns:
$this

Implemented in ExportData.

setLocations ( locations  ) 

Set locations using a formatted array.

See also:
getLocations() for formatting.

Implemented in ExportData.

setPage ( page_id  ) 

Set the current page

It's possible to store multiple pages or grids in one object, use this to designate the current page to write data to.

Parameters:
mixed $page_id
Returns:
$this

Implemented in ExportData.

setPageOrder ( page_id  ) 

Set the order the pages appear in the data array

Parameters:
string $page_id Enter all page_ids in correct order as function arguments
Returns:
$this

Implemented in ExportData.

setPointer ( index = NULL  ) 

Advance the record pointer to a given index or all the way to the end

Parameters:
int|NULL $index (Optional) Defaults to NULL. When NULL the pointer will move to the end to begin a new row of data.
Returns:
$this

Implemented in ExportData.

storeLocation ( location_id  ) 

Store the current page and pointer location for later resuming

Parameters:
string $location_id A unique key or preset id to remember this location by.
Returns:
$this

Implemented in ExportData.


The documentation for this interface was generated from the following file:
 All Data Structures Files Functions Variables

Generated on Fri Jan 17 20:40:34 2014 for Loft Data Grids by  doxygen 1.6.1