Class Bvb_Grid_Source_Array

Description

Implements interfaces:

LICENSE

This source file is subject to the new BSD license It is available through the world-wide-web at this URL: http://www.petala-azul.com/bsd.txt If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to geral@petala-azul.com so we can send you a copy immediately.

Located in /Grid/Source/Array.php (line 20)


	
			
Direct descendents
Class Description
Bvb_Grid_Source_Csv LICENSE
Bvb_Grid_Source_Json LICENSE
Bvb_Grid_Source_Xml LICENSE
Variable Summary
mixed $_cache
mixed $_fields
mixed $_offset
mixed $_primaryKey
mixed $_rawResult
mixed $_sourceName
mixed $_start
Method Summary
Bvb_Grid_Source_Array __construct ( $array, [ $titles = null])
void addCondition ( $filter,  $op,  $completeField)
void addFullTextSearch ( $filter,  $field)
void buildFields ()
void buildForm ([ $inputsType = array()])
void buildQueryLimit ( $offset,  $start)
void buildQueryOrder ( $field,  $order, [ $reset = false])
void commit ()
void delete ( $table,  $condition)
void execute ()
void fetchDetail ( $where)
json getAutoCompleteForFilter ( $term,  $field, [ $specialKey = ''], [ $output = 'json'])
void getCache ()
void getConnectionId ()
void getDistinctValuesForFilters ( $field,  $fieldValue, [ $order = 'name ASC'])
void getFieldType ( $field)
void getIdentifierColumns ( $table)
void getMainTable ()
void getMassActionsIds ( $table,  $fields, [ $separator = '-'])
void getRecord ( $table,  $condition)
void getSelectObject ()
void getSelectOrder ()
void getSourceName ()
void getSqlExp ( $value, [ $where = array()])
void getTableList ()
void getTotalRecords ()
void getValuesForFiltersFromTable ( $table,  $field,  $fieldValue, [ $order = 'name ASC'])
void hasCrud ()
void insert ( $table,  $post)
void quoteValue ( $value)
void resetLimit ()
void resetOrder ()
void rollBack ()
void setCache ( $cache)
void setPrimaryKey ( $pk)
void setTotalRecords (int $total)
void update ( $table,  $post,  $condition)
void _applySearchType ( $final,  $filtro,  $op)
void _applySqlExpToArray ($field $field, $operation $operation, [$option $value = null], [ $where = array()])
void _object2array ( $data)
Variables
mixed $_cache (line 28)
  • access: protected
mixed $_fields (line 22)
  • access: protected
mixed $_offset (line 24)
  • access: protected
mixed $_primaryKey = null (line 29)
  • access: protected
mixed $_rawResult (line 23)
  • access: protected
mixed $_sourceName (line 27)
  • access: protected
mixed $_start (line 25)
  • access: protected
mixed $_totalRecords = 0 (line 26)
  • access: protected
Methods
Constructor __construct (line 31)
  • access: public
Bvb_Grid_Source_Array __construct ( $array, [ $titles = null])
  • array $array
  • $titles

Redefined in descendants as:
addCondition (line 101)
  • access: public
void addCondition ( $filter,  $op,  $completeField)
  • $filter
  • $op
  • $completeField

Implementation of:
Bvb_Grid_Source_SourceInterface::addCondition()
Adds a new condition to the current query
addFullTextSearch (line 359)
  • access: public
void addFullTextSearch ( $filter,  $field)
  • $filter
  • $field

Implementation of:
Bvb_Grid_Source_SourceInterface::addFullTextSearch()
Adds a fulltext search instead of a addcondition method
beginTransaction (line 483)
  • access: public
void beginTransaction ()

Implementation of:
Bvb_Grid_Source_SourceInterface::beginTransaction()
Starts a transaction
buildFields (line 75)
  • access: public
void buildFields ()

Implementation of:
Bvb_Grid_Source_SourceInterface::buildFields()
builds a key=>value array
buildForm (line 393)
  • access: public
void buildForm ([ $inputsType = array()])
  • $inputsType

Implementation of:
Bvb_Grid_Source_SourceInterface::buildForm()
Build the form based on a Model or query
buildQueryLimit (line 94)
  • access: public
void buildQueryLimit ( $offset,  $start)
  • $offset
  • $start

Implementation of:
Bvb_Grid_Source_SourceInterface::buildQueryLimit()
Build the query limit clause
buildQueryOrder (line 221)
  • access: public
void buildQueryOrder ( $field,  $order, [ $reset = false])
  • $field
  • $order
  • $reset

Implementation of:
Bvb_Grid_Source_SourceInterface::buildQueryOrder()
Build the order part from the query.
commit (line 488)
  • access: public
void commit ()

Implementation of:
Bvb_Grid_Source_SourceInterface::commit()
Commits
delete (line 374)
  • access: public
void delete ( $table,  $condition)
  • $table
  • array $condition

Implementation of:
Bvb_Grid_Source_SourceInterface::delete()
Delete a record from a table

Redefined in descendants as:
execute (line 198)
  • access: public
void execute ()

Implementation of:
Bvb_Grid_Source_SourceInterface::execute()
Runs the query and returns the result as a associative array
fetchDetail (line 334)
  • access: public
void fetchDetail ( $where)
  • array $where

Implementation of:
Bvb_Grid_Source_SourceInterface::fetchDetail()
Get a record detail based the current query
getAutoCompleteForFilter (line 461)

Returns a JSON encoded array of options to be used by auto-complete operations

  • var: Term to search
  • access: public
json getAutoCompleteForFilter ( $term,  $field, [ $specialKey = ''], [ $output = 'json'])
  • $term
  • $field
  • $specialKey
  • $output

Implementation of:
Bvb_Grid_Source_SourceInterface::getAutoCompleteForFilter()
Returns a JSON encoded array of options to be used by auto-complete operations
getCache (line 379)
  • access: public
void getCache ()
getConnectionId (line 498)
  • access: public
void getConnectionId ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getConnectionId()
Returns curretn connection ID
getDescribeTable (line 183)
  • access: public
void getDescribeTable ()
getDistinctValuesForFilters (line 324)
  • access: public
void getDistinctValuesForFilters ( $field,  $fieldValue, [ $order = 'name ASC'])
  • $field
  • $fieldValue
  • $order

Implementation of:
Bvb_Grid_Source_SourceInterface::getDistinctValuesForFilters()
Should perform a query based on the provided by the user select the two fields and return an array $field=>$value as result
getFieldType (line 349)
  • access: public
void getFieldType ( $field)
  • $field

Implementation of:
Bvb_Grid_Source_SourceInterface::getFieldType()
Return field type char, varchar, int
getFilterValuesBasedOnFieldDefinition (line 188)
  • access: public
void getFilterValuesBasedOnFieldDefinition ( $field)
  • $field

Implementation of:
Bvb_Grid_Source_SourceInterface::getFilterValuesBasedOnFieldDefinition()
Return possible filters values based on field definition This is mostly used for enum fields where the possible values are extracted
getIdentifierColumns (line 409)
  • access: public
void getIdentifierColumns ( $table)
  • $table

Implementation of:
Bvb_Grid_Source_SourceInterface::getIdentifierColumns()
Returns an array of table identifier columns or PK's
getMainTable (line 211)
  • access: public
void getMainTable ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getMainTable()
Returns the "main" table the one after select * FROM {MAIN_TABLE}
getMassActionsIds (line 421)
  • access: public
void getMassActionsIds ( $table,  $fields, [ $separator = '-'])
  • $table
  • $fields
  • $separator

Implementation of:
Bvb_Grid_Source_SourceInterface::getMassActionsIds()
Returns tables primary keys separeted by commas "," This is necessary for mass actions
getRecord (line 471)
  • access: public
void getRecord ( $table,  $condition)
  • $table
  • array $condition

Implementation of:
Bvb_Grid_Source_SourceInterface::getRecord()
Gets a unique record as a associative array

Redefined in descendants as:
getSelectObject (line 354)
  • access: public
void getSelectObject ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getSelectObject()
Returns the select object
getSelectOrder (line 178)
  • see: library/Bvb/Grid/Source/Bvb_Grid_Source_SourceInterface::getSelectOrder()
  • access: public
void getSelectOrder ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getSelectOrder()
returns the selected order that was defined by the user in the query entered and not the one generated by the system
getSourceName (line 70)
  • access: public
void getSourceName ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getSourceName()
Should return the database server name or source name
getSqlExp (line 254)
  • access: public
void getSqlExp ( $value, [ $where = array()])
  • array $value
  • $where

Implementation of:
Bvb_Grid_Source_SourceInterface::getSqlExp()
Perform a sqlexp
getTableList (line 216)
  • access: public
void getTableList ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getTableList()
Ex: array('c'=>array('tableName'=>'Country')); where c is the table alias. If the table as no alias, c should be the table name
getTotalRecords (line 193)
  • access: public
void getTotalRecords ()

Implementation of:
Bvb_Grid_Source_SourceInterface::getTotalRecords()
Return the total of records
getValuesForFiltersFromTable (line 434)
  • access: public
void getValuesForFiltersFromTable ( $table,  $field,  $fieldValue, [ $order = 'name ASC'])
  • $table
  • $field
  • $fieldValue
  • $order

Implementation of:
Bvb_Grid_Source_SourceInterface::getValuesForFiltersFromTable()
Fetch pairs from a table
hasCrud (line 466)
  • access: public
void hasCrud ()

Implementation of:
Bvb_Grid_Source_SourceInterface::hasCrud()
Should return true|false if this source support crud operations

Redefined in descendants as:
insert (line 364)
  • access: public
void insert ( $table,  $post)
  • $table
  • array $post

Implementation of:
Bvb_Grid_Source_SourceInterface::insert()
Insert an array of key=>values in the specified table

Redefined in descendants as:
quoteValue (line 55)
  • access: public
void quoteValue ( $value)
  • $value

Implementation of:
Bvb_Grid_Source_SourceInterface::quoteValue()
Quotes a string
resetLimit (line 65)
  • access: public
void resetLimit ()

Implementation of:
Bvb_Grid_Source_SourceInterface::resetLimit()
Removes any offset in que query
resetOrder (line 60)
  • access: public
void resetOrder ()

Implementation of:
Bvb_Grid_Source_SourceInterface::resetOrder()
Removes any order in que query
rollBack (line 493)
  • access: public
void rollBack ()

Implementation of:
Bvb_Grid_Source_SourceInterface::rollBack()
Rollbacks
setCache (line 384)
  • access: public
void setCache ( $cache)
  • $cache

Implementation of:
Bvb_Grid_Source_SourceInterface::setCache()
Cache handler.
setPrimaryKey (line 428)
  • access: public
void setPrimaryKey ( $pk)
  • array $pk
setTotalRecords (line 445)

Defines total records

  • access: public
void setTotalRecords (int $total)
  • int $total: Total records found

Implementation of:
Bvb_Grid_Source_SourceInterface::setTotalRecords()
Defines total records found
update (line 369)
  • access: public
void update ( $table,  $post,  $condition)
  • $table
  • array $post
  • array $condition

Implementation of:
Bvb_Grid_Source_SourceInterface::update()
Update values in a table using the $condition clause

Redefined in descendants as:
_applySearchType (line 123)

Apply the search to a give field when the adaptar is an array

  • access: protected
void _applySearchType ( $final,  $filtro,  $op)
  • $final
  • $filtro
  • $op
_applySqlExpToArray (line 280)

Applies the SQL EXP options to an array

  • access: protected
void _applySqlExpToArray ($field $field, $operation $operation, [$option $value = null], [ $where = array()])
  • $field $field
  • $operation $operation
  • $option $value
  • $where
_object2array (line 243)
  • access: protected
void _object2array ( $data)
  • $data

Documentation generated on Sun, 17 Jul 2011 02:35:42 +0200 by phpDocumentor 1.4.3