Abstract Class P4A_Data_Source

Description

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

P4A_Object
   |
   --P4A_Data_Source
Direct descendents
Class Description
 class P4A_Dir_Source
 class P4A_Array_Source
 class P4A_DB_Source Read/write data from/to a database.
Variable Summary
 boolean $_is_read_only
 boolean $_is_sortable
 integer $_limit
 integer $_num_pages
 integer $_num_rows
 integer $_offset
 array $_order
 integer $_page_limit
 string $_pk
 integer $_pointer
Method Summary
 P4A_Data_Source __construct ( $name)
 P4A_Data_Source addOrder (string $field, [string $direction = P4A_ORDER_ASCENDING])
 void deleteRow ()
 P4A_Data_Source dropOrder ([string $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 ()
 integer getOffset ()
 array getOrder ()
 integer getPageLimit ()
 string getPk ()
 void getPkRow ( $pk)
 void getPkValues ()
 void getRowNumber ()
 boolean hasOrder ()
 boolean isNew ()
 boolean isSortable ([boolean $value = null])
 void lastPage ([ $move_pointer = true])
 void lastRow ()
 void load ()
 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 saveUploads ()
 P4A_Data_Source setOrder (string $field, [string $direction = P4A_ORDER_ASCENDING])
 P4A_Data_Source setPageLimit (integer $page_limit)
 P4A_Data_Source setPk (string $pk)
Variables
P4A_Collection $fields = null (line 95)
  • access: public

Redefined in descendants as:
boolean $_is_read_only = false (line 80)
  • access: protected
boolean $_is_sortable = false (line 85)
  • access: protected

Redefined in descendants as:
integer $_limit = null (line 55)
  • access: protected
integer $_num_pages = null (line 70)
  • access: protected
integer $_num_rows = null (line 65)
  • access: protected
integer $_offset = null (line 60)
  • access: protected
array $_order = array() (line 90)
  • access: protected
integer $_page_limit = 10 (line 75)
  • access: protected
string $_pk = null (line 50)
  • access: protected

Redefined in descendants as:
integer $_pointer = null (line 45)
  • access: protected

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 __construct (line 97)
  • access: public
P4A_Data_Source __construct ( $name)
  • $name

Redefinition of:
P4A_Object::__construct()

Redefined in descendants as:
addOrder (line 155)
  • access: public
P4A_Data_Source addOrder (string $field, [string $direction = P4A_ORDER_ASCENDING])
  • string $field
  • string $direction
deleteRow (line 558)
  • access: public
void deleteRow ()

Redefined in descendants as:
dropOrder (line 207)
  • access: public
P4A_Data_Source dropOrder ([string $field = null])
  • string $field
exportAsCSV (line 549)
  • access: public
void exportAsCSV ([ $filename = ''], [ $separator = ','], [ $fields_names = null])
  • $filename
  • $separator
  • $fields_names
exportToCSV (line 544)
  • access: public
void exportToCSV ([ $filename = ''], [ $separator = ','], [ $fields_names = null])
  • $filename
  • $separator
  • $fields_names
firstPage (line 444)
  • access: public
void firstPage ([ $move_pointer = true])
  • $move_pointer
firstRow (line 239)
  • access: public
void firstRow ()
getAll (line 217)
  • access: public
void getAll ([ $from = 0], [ $count = 0])
  • $from
  • $count

Redefined in descendants as:
getAsCSV (line 507)
  • access: public
void getAsCSV ([ $separator = ','], [ $fields_names = null])
  • $separator
  • $fields_names
getNumPage (line 397)

Returns the number of the current page

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

Returns the number of pages in the data source

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

Redefined in descendants as:
getOffset (line 351)
  • access: public
integer getOffset ()
getOrder (line 177)
  • access: public
array getOrder ()
getPageLimit (line 370)
  • access: public
integer getPageLimit ()
getPk (line 480)
  • access: public
string getPk ()
getPkRow (line 502)
  • access: public
void getPkRow ( $pk)
  • $pk

Redefined in descendants as:
getPkValues (line 485)
  • access: public
void getPkValues ()
getRowNumber (line 226)
  • access: public
void getRowNumber ()
hasOrder (line 198)
  • access: public
boolean hasOrder ()
isNew (line 132)
  • access: public
boolean isNew ()
isSortable (line 143)

gets/sets sortable state

  • access: public
boolean isSortable ([boolean $value = null])
  • boolean $value
lastPage (line 461)
  • access: public
void lastPage ([ $move_pointer = true])
  • $move_pointer
lastRow (line 275)
  • access: public
void lastRow ()
load (line 103)
  • access: public
void load ()

Redefined in descendants as:
newRow (line 114)
  • access: public
P4A_Data_Source newRow ()
nextPage (line 455)
  • access: public
void nextPage ([ $move_pointer = true])
  • $move_pointer
nextRow (line 263)
  • access: public
void nextRow ()
page (line 412)

Returns a page of date (some rows)

  • access: public
array page ([ $num_page = null], [ $move_pointer = true])
  • $num_page
  • $move_pointer
prevPage (line 449)
  • access: public
void prevPage ([ $move_pointer = true])
  • $move_pointer
prevRow (line 251)
  • access: public
void prevRow ()
row (line 107)
  • access: public
void row ([ $num_row = null], [ $move_pointer = true])
  • $num_row
  • $move_pointer

Redefined in descendants as:
saveUploads (line 291)

Moves uploaded files from P4A_UPLOADS_TMP_DIR to P4A_UPLOADS_DIR

  • throws: P4A_Exception
  • access: public
void saveUploads ()
setOrder (line 167)

alias for addOrder()

  • access: public
P4A_Data_Source setOrder (string $field, [string $direction = P4A_ORDER_ASCENDING])
  • string $field
  • string $direction
setPageLimit (line 361)
  • access: public
P4A_Data_Source setPageLimit (integer $page_limit)
  • integer $page_limit
setPk (line 471)
  • access: public
P4A_Data_Source setPk (string $pk)
  • string $pk
updateRowPosition (line 234)
  • access: public
P4A_Data_Source updateRowPosition ()

Redefined in descendants as:

Inherited Methods

Inherited From P4A_Object

 P4A_Object::__construct()
 P4A_Object::actionHandler()
 P4A_Object::build()
 P4A_Object::destroy()
 P4A_Object::dropImplement()
 P4A_Object::dropMethod()
 P4A_Object::errorHandler()
 P4A_Object::getId()
 P4A_Object::getName()
 P4A_Object::getObjectType()
 P4A_Object::getParentID()
 P4A_Object::implement()
 P4A_Object::intercept()
 P4A_Object::isActionTriggered()
 P4A_Object::setName()
 P4A_Object::setParentID()
 P4A_Object::void()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Tue, 02 Sep 2008 10:03:59 +0200 by phpDocumentor 1.4.2