Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class PNObjectArray

Class: PNObjectArray

Source Location: /pnobjlib/PNObjectArray.class.php

Class Overview

PNObject
   |
   --PNObjectArray

PNObjectArrayUtil

Methods


Inherited Variables

Class: PNObject

PNObject::$_columns
PNObject::$_GET_FROM_DB
PNObject::$_GET_FROM_GET
PNObject::$_GET_FROM_POST
PNObject::$_GET_FROM_REQUEST
PNObject::$_GET_FROM_SESSION
PNObject::$_GET_FROM_VALIDATION_FAILED
PNObject::$_objColumnArray
PNObject::$_objData
PNObject::$_objField
PNObject::$_objJoin
PNObject::$_objKey
PNObject::$_objPath
PNObject::$_objPermissionFilter
PNObject::$_objSessionPath
PNObject::$_objType
PNObject::$_objValidation
PNObject::$_table

Inherited Methods

Class: PNObject

PNObject::PNObject()
Constructur, init everything to sane defaults and handle parameters
PNObject::clearFailedValidationData()
Clear the failed validation object data for this object
PNObject::clearSessionCache()
Clear the session cache for this object
PNObject::clearValidationErrors()
Clear the failed validation errors for this object
PNObject::delete()
Generic delete handler for an object
PNObject::deletePostProcess()
Post-Process the data after a delete. Subclasses can define appropriate implementations.
PNObject::deletePreProcess()
Pre-Process the data prior a delete. Subclasses can define appropriate implementations.
PNObject::generateEmptyObject()
Generate an empty object with the fields initialized to null
PNObject::get()
Return the current object data. If $key and $field are supplied, the object is fetched again from the database.
PNObject::getData()
Return the currently set object data
PNObject::getDataField()
Generic function to retrieve
PNObject::getDataFromInput()
Get the data from the various input streams provided.
PNObject::getDataFromInputPostProcess()
Post-Process the data after getting it from Input. Subclasses can define appropriate implementations.
PNObject::getDataFromSession()
Get the data from the various input streams provided.
PNObject::getDataFromSessionPostProcess()
Post-Process the data after getting it from Session. Subclasses can define appropriate implementations.
PNObject::getDataFromSource()
Generic access function to retrieve data from the specified source
PNObject::getFailedValidationData()
Get the object which failed validation
PNObject::getHash()
Get the hashcode for this object data
PNObject::getID()
Return the object-ID or false
PNObject::getIDField()
Return the object ID field name
PNObject::getValidation()
PNObject::getWhere()
Return/Select the object using the given where clause.
PNObject::hasID()
Return whether or not this object has a set id field
PNObject::insert()
Generic insert handler for an object (ID is inserted into the object data)
PNObject::insertPostProcess()
Post-Process the data after an insert. Subclasses can define appropriate implementations.
PNObject::insertPreProcess()
Pre-Process the data prior to an insert. Subclasses can define appropriate implementations.
PNObject::prayer()
Print HTML-formatted debug output for the object
PNObject::prayerData()
Print HTML-formatted debug output for the object data
PNObject::save()
Generic insert handler for an object (ID is inserted into the object data). If the object contains a valid ID, it is updated, otherwise it it inserted
PNObject::select()
Select the object from the database using the specified key (and field)
PNObject::selectPostProcess()
Post-Process the newly selected object. Subclasses can define appropriate implementations.
PNObject::setData()
Set (and return) the object data.
PNObject::setDataField()
Generic function to retrieve
PNObject::setDataToSession()
Set the current object data into session
PNObject::setDataToSessionPreProcess()
Pre-Process the data before writing it to Session. Subclasses can define appropriate implementations.
PNObject::update()
Generic upate handler for an object
PNObject::updatePostProcess()
Post-Process the data after an update. Subclasses can define appropriate implementations.
PNObject::updatePreProcess()
Pre-Process the data prior to an update. Subclasses can define appropriate implementations.
PNObject::validate()
Generic function to validate an object
PNObject::validatePostProcess()
Post-Process the basic object validation with class specific logic.
PNObject::_init()
Internal intialization routine

Class Details

[line 20] PNObjectArrayUtil



[ Top ]

Class Methods


constructor PNObjectArray [line 28]

PNObjectArray PNObjectArray( [init $init = null], [where $where = ''])

Constructur, init everything to sane defaults and handle parameters





Parameters:

init   $init   Initialization value (see _init() for details)
where   $where   The where clause to apply to the DB get/select (optional) (default='')

[ Top ]

method clean [line 369]

The clean( [objArray $objArray = null])

Clean the acquired input



Tags:

return:  Object Data


Parameters:

objArray   $objArray   The object-array to clean (optional) (default=null, reverts to $this->_objData)

[ Top ]

method delete [line 324]

The delete( )

Generic delete handler for an object



Tags:

return:  Object Data


Overrides PNObject::delete() (Generic delete handler for an object)

[ Top ]

method deleteWhere [line 348]

The deleteWhere( [where $where = null])

Delete with a where-clause



Tags:

return:  Object Data


Parameters:

where   $where   The where-clause to use

[ Top ]

method genFilter [line 137]

The genFilter( [filter $filter = array()])

Generate a filter for the array view. Default implementation which can be overridden by subclasses.



Tags:

return:  generated filter (where-clause) string


Parameters:

filter   $filter   An array containing the set filter values (optional) (default=array())

[ Top ]

method get [line 181]

The get( [where $where = ''], [sort $sort = ''], [limitOffset $limitOffset = -1], [limitNumRows $limitNumRows = -1], [assocKey $assocKey = null], [force $force = false], [distinct $distinct = false])

Return the current object data. Maps to $this->getWhere().



Tags:

return:  object's data value


Overrides PNObject::get() (Return the current object data. If $key and $field are supplied, the object is fetched again from the database.)

Parameters:

where   $where   The where-clause to use
sort   $sort   The order-by clause to use
limitOffset   $limitOffset   The limiting offset
limitNumRows   $limitNumRows   The limiting number of rows
assocKey   $assocKey   Key field to use for building an associative array (optional) (default=null)
force   $force   whether or not to force a DB-get (optional) (default=false)
distinct   $distinct   whether or not to do a select distinct (optional) (default=false)

[ Top ]

method getCount [line 119]

The getCount( [where $where = ''], [doJoin $doJoin = false])

Return the record count for the given object set



Tags:

return:  object's data set count


Parameters:

where   $where   The where-clause to use
doJoin   $doJoin   whether or not to use the auto-join for the count

[ Top ]

method getData [line 192]

The getData( )

Return the currently set object data



Tags:

return:  object's data array


Overrides PNObject::getData() (Return the currently set object data)

[ Top ]

method getDataField [line 246]

The getDataField( $offset, $key, [ $default = null])

Generic function to retrieve



Tags:

return:  Object Data


Overrides PNObject::getDataField() (Generic function to retrieve)

Parameters:

   $offset  
   $key  
   $default  

[ Top ]

method getHash [line 459]

void getHash( [ $includeStandardFields = true], [ $objArray = null])

Get the hashcode for this object data array





Overrides PNObject::getHash() (Get the hashcode for this object data)

Parameters:

   $includeStandardFields  
   $objArray  

[ Top ]

method getSelector [line 404]

The getSelector( name $name, [selected $selected = -1234], defaultValue $defaultValue, [defaultText $defaultText = ''], allValue $allValue, [allText $allText = ''], [idField $idField = 'id'], [nameField $nameField = 'title'], [submit $submit = false], [ignoreList $ignoreList = null])

Get a selector for the object array



Tags:

return:  generated selector html text


Parameters:

name   $name   The name of the selector to generate
selected   $selected   The currently selected value (optional) (default=-1234)
defaultValue   $defaultValue   The default value (optional) (default=0)
defaultText   $defaultText   The default text (optional) (default='')
allValue   $allValue   The all-selected value (optional) (default=0)
allText   $allText   The all-selected text (optional) (default='')
idField   $idField   The id field to use (optional) (default='id')
nameField   $nameField   The name field to use (optional) (default='title')
submit   $submit   whether or not to submit the form upon selection (optional) (default=false)
ignoreList   $ignoreList   The list of entries to ignore (default=null)

[ Top ]

method getWhere [line 156]

The getWhere( [where $where = ''], [sort $sort = ''], [limitOffset $limitOffset = -1], [limitNumRows $limitNumRows = -1], [assocKey $assocKey = null], [force $force = false], [distinct $distinct = false])

Return/Select the object using the given where clause.



Tags:

return:  object's data value


Overrides PNObject::getWhere() (Return/Select the object using the given where clause.)

Parameters:

where   $where   The where-clause to use
sort   $sort   The order-by clause to use
limitOffset   $limitOffset   The limiting offset
limitNumRows   $limitNumRows   The limiting number of rows
assocKey   $assocKey   Key field to use for building an associative array (optional) (default=null)
force   $force   whether or not to force a DB-get (optional) (default=false)
distinct   $distinct   whether or not to do a select distinct (optional) (default=false)

[ Top ]

method insert [line 280]

The insert( )

Generic insert handler for an object (ID is inserted into the object data)



Tags:

return:  Object Data


Overrides PNObject::insert() (Generic insert handler for an object (ID is inserted into the object data))

[ Top ]

method save [line 262]

The save( )

Save an object - if it has an ID update it, otherwise insert it



Tags:

return:  result set


Overrides PNObject::save() (Generic insert handler for an object (ID is inserted into the object data). If the object contains a valid ID, it is updated, otherwise it it inserted)

[ Top ]

method select [line 210]

The select( [where $where = ''], [orderBy $orderBy = ''], [limitOffset $limitOffset = -1], [limitNumRows $limitNumRows = -1], [assocKey $assocKey = false], [distinct $distinct = false])

Generic select handler for an object. Select (and set) the specified object array



Tags:

return:  selected Object-Array


Overrides PNObject::select() (Select the object from the database using the specified key (and field))

Parameters:

where   $where   The where-clause to use
orderBy   $orderBy   The order-by clause to use
limitOffset   $limitOffset   The limiting offset
limitNumRows   $limitNumRows   The limiting number of rows
assocKey   $assocKey   Key field to use for building an associative array (optional) (default=null)
distinct   $distinct   whether or not to use the distinct clause

[ Top ]

method selectPostProcess [line 236]

The selectPostProcess( [ $data = null])

Iterate over the object data and post-process it



Tags:

return:  Object Data


Overrides PNObject::selectPostProcess() (Post-Process the newly selected object. Subclasses can define appropriate implementations.)

Parameters:

   $data  

[ Top ]

method setData [line 100]

void setData( data $data)

Set (and return) the object data. Since we dont' have a definitive key, we don't cache





Overrides PNObject::setData() (Set (and return) the object data.)

Parameters:

data   $data   The data to assign

[ Top ]

method update [line 302]

The update( )

Generic upate handler for an object



Tags:

return:  Object Data


Overrides PNObject::update() (Generic upate handler for an object)

[ Top ]

method validate [line 441]

Boolean validate( )

Constructur, init everything to sane defaults and handle parameters



Tags:

return:  indicating whether or not validation passed successfully


Overrides PNObject::validate() (Generic function to validate an object)

[ Top ]

method _init [line 56]

void _init( [init $init = null], [where $where = ''], [orderBy $orderBy = ''], [assocKey $assocKey = null])

Internal intialization routine





Overrides PNObject::_init() (Internal intialization routine)

Parameters:

init   $init   Initialization value (can be an object or a string directive) (optional) (default=null)
where   $where   The where clause to use when retrieving the object array (optional) (default='')
orderBy   $orderBy   The order-by clause to use when retrieving the object array (optional) (default='')
assocKey   $assocKey  

Key field to use for building an associative array (optional) (default=null)

If $init is an arrary it is set(), otherwise it is interpreted as a string specifying the source from where the data should be retrieved from.


[ Top ]

Packages:

Files:

Classes: