Class P4A_Data_Source

Description

P4A - PHP For Applications.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

To contact the authors write to:
CreaLabs
Via Medail, 32
10144 Torino (Italy)
Web: http://www.crealabs.it
E-mail: info@crealabs.it

The latest version of p4a can be obtained from: http://p4a.sourceforge.net

Located in /p4a/objects/data_source.php (line 39)

P4A_Object
   |
   --P4A_Data_Source
Direct descendents
Class Description
 class P4A_Array_Source P4A - PHP For Applications.
 class P4A_Dir_Source P4A - PHP For Applications.
 class P4A_DB_Source P4A - PHP For Applications.
Variable Summary
 mixed $fields
 mixed $_fields
 mixed $_limit
 mixed $_num_pages
 mixed $_num_rows
 mixed $_offset
 mixed $_order
 mixed $_page_limit
 mixed $_pk
 mixed $_pointer
Method Summary
 P4A_Data_Source P4A_Data_Source ( $name)
 void addOrder ( $field, [ $direction = P4A_ORDER_ASCENDING])
 void deleteRow ()
 void dropOrder ([ $field = null])
 void exportAsCSV ([ $filename = ""], [ $separator = ','], [ $fields_names = null])
 void exportToCSV ([ $filename = ""], [ $separator = ','], [ $fields_names = null])
 void firstPage ([ $move_pointer = true])
 void firstRow ()
 void getAll ([ $from = 0], [ $count = 0])
 void getAsCSV ([ $separator = ','], [ $fields_names = null])
 integer getNumPage ()
 integer getNumPages ()
 void getNumRows ()
 void getOffset ()
 void getOrder ()
 void getPageLimit ()
 void getPk ()
 void getPkRow ( $pk)
 void getPkValues ()
 void getRowNumber ()
 void hasOrder ()
 void isNew ()
 void isSortable ([ $value = null])
 void lastPage ([ $move_pointer = true])
 void lastRow ()
 void load ()
 void newRow ()
 void nextPage ([ $move_pointer = true])
 void nextRow ()
 array page ([ $num_page = null], [ $move_pointer = true])
 void prevPage ([ $move_pointer = true])
 void prevRow ()
 void row ([ $num_row = NULL], [ $move_pointer = TRUE])
 void setOrder ( $field, [ $direction = P4A_ORDER_ASCENDING])
 void setPageLimit ( $page_limit)
 void setPk ( $pk)
Variables
mixed $fields = null (line 58)

Redefined in descendants as:
mixed $_fields = null (line 52)
mixed $_is_read_only = false (line 54)
mixed $_is_sortable = false (line 55)

Redefined in descendants as:
mixed $_limit = null (line 45)
mixed $_num_pages = null (line 49)
mixed $_num_rows = null (line 48)
mixed $_offset = null (line 46)
mixed $_order = array() (line 56)
mixed $_page_limit = 10 (line 50)
mixed $_pk = null (line 43)

Redefined in descendants as:
mixed $_pointer = null (line 41)

Inherited Variables

Inherited from P4A_Object

P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Methods
Constructor P4A_Data_Source (line 60)
P4A_Data_Source P4A_Data_Source ( $name)
  • $name
addOrder (line 103)
void addOrder ( $field, [ $direction = P4A_ORDER_ASCENDING])
  • $field
  • $direction
deleteRow (line 425)
void deleteRow ()

Redefined in descendants as:
dropOrder (line 137)
void dropOrder ([ $field = null])
  • $field
exportAsCSV (line 405)
void exportAsCSV ([ $filename = ""], [ $separator = ','], [ $fields_names = null])
  • $filename
  • $separator
  • $fields_names
exportToCSV (line 400)
void exportToCSV ([ $filename = ""], [ $separator = ','], [ $fields_names = null])
  • $filename
  • $separator
  • $fields_names
firstPage (line 308)
void firstPage ([ $move_pointer = true])
  • $move_pointer
firstRow (line 165)
void firstRow ()
getAll (line 146)
void getAll ([ $from = 0], [ $count = 0])
  • $from
  • $count

Redefined in descendants as:
getAsCSV (line 363)
void getAsCSV ([ $separator = ','], [ $fields_names = null])
  • $separator
  • $fields_names
getNumPage (line 259)

Returns the number of the current page

  • access: public
integer getNumPage ()
getNumPages (line 238)

Returns the number of pages in the data source

  • access: public
integer getNumPages ()
getNumRows (line 150)
void getNumRows ()

Redefined in descendants as:
getOffset (line 217)
void getOffset ()
getOrder (line 114)
void getOrder ()
getPageLimit (line 228)
void getPageLimit ()
getPk (line 336)
void getPk ()
getPkRow (line 358)
void getPkRow ( $pk)
  • $pk

Redefined in descendants as:
getPkValues (line 341)
void getPkValues ()
getRowNumber (line 155)
void getRowNumber ()
hasOrder (line 132)
void hasOrder ()
isNew (line 86)
void isNew ()
isSortable (line 95)
void isSortable ([ $value = null])
  • $value
lastPage (line 325)
void lastPage ([ $move_pointer = true])
  • $move_pointer
lastRow (line 204)
void lastRow ()
load (line 65)
void load ()

Redefined in descendants as:
newRow (line 73)
void newRow ()
nextPage (line 319)
void nextPage ([ $move_pointer = true])
  • $move_pointer
nextRow (line 191)
void nextRow ()
page (line 276)

Returns a page of date (some rows)

  • access: public
array page ([ $num_page = null], [ $move_pointer = true])
  • $num_page
  • $move_pointer
prevPage (line 313)
void prevPage ([ $move_pointer = true])
  • $move_pointer
prevRow (line 178)
void prevRow ()
row (line 69)
void row ([ $num_row = NULL], [ $move_pointer = TRUE])
  • $num_row
  • $move_pointer

Redefined in descendants as:
setOrder (line 108)
void setOrder ( $field, [ $direction = P4A_ORDER_ASCENDING])
  • $field
  • $direction
setPageLimit (line 223)
void setPageLimit ( $page_limit)
  • $page_limit
setPk (line 331)
void setPk ( $pk)
  • $pk
updateRowPosition (line 160)
void updateRowPosition ()

Redefined in descendants as:

Inherited Methods

Inherited From P4A_Object

 P4A_Object::actionHandler()
 P4A_Object::build()
 P4A_Object::destroy()
 P4A_Object::dropIntercept()
 P4A_Object::errorHandler()
 P4A_Object::getId()
 P4A_Object::getName()
 P4A_Object::getObjectType()
 P4A_Object::getParentID()
 P4A_Object::implementMethod()
 P4A_Object::intercept()
 P4A_Object::isActionTriggered()
 P4A_Object::p4a_object()
 P4A_Object::setName()
 P4A_Object::setParentID()
 P4A_Object::void()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Mon, 07 Jan 2008 11:29:15 +0100 by phpDocumentor 1.4.0