Class Giscuit_Db_Table_Layer_Abstract

Description

Abstract class for table

  • copyright: Copyright (c) 2012 VEC

Located in /Db/Table/Layer/Abstract.php (line 30)

Zend_Db_Table_Abstract
   |
   --Giscuit_Db_Table_Abstract
      |
      --Giscuit_Db_Table_Layer_Abstract
Direct descendents
Class Description
 class Giscuit_Db_Table_Layer_Quickaccess Class for quickaccess table
 class Giscuit_Db_Table_Layer_Masking Class for masking table
 class Giscuit_Db_Table_Layer_Rastercut Rastercut table class
 class Giscuit_Db_Table_Layer_History History class for table
 class Giscuit_Db_Table_Layer_Worldboundaries World boundaries class for table
Variable Summary
Method Summary
 __construct ([array $options = array()]) void
 addBbox (Zend_Db_Select $select, string $bbox) void
 addItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL]) integer
 addLabelFields (Zend_Db_Select $select,  $fields) array
 deleteItemForEditCallback (integer $gid) bool
 formatInfoResults (stdClass $itemField, string $name, mixed $value, Zend_Form $form) void
 formatSearchResults (Zend_Db_Table_Rowset $rows, Zend_Form $form) Zend_Db_Table_Rowset
 getArea (string $geometry) string
 getByField (array $field, string $text, [ $options = array()]) Zend_Db_Table_Rowset
 getByPoint (float $x, float $y, float $buffer, [ $options = array()]) Zend_Db_Table_Rowset
 getDefaultField () string
 getItemForAddCallback ([Zend_Form $form = NULL]) void
 getItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL]) Zend_Db_Table_Row
 getItems ([ $options = array()]) Zend_Db_Table_Rowset
 getMaxAndMinValues (Zend_Db_Table_Row $field) Zend_Db_Table_Rowset
 getPublicFields ([ $options = array()]) array
 getRandomValues (Zend_Db_Table_Row $field, [ $options = array()]) Zend_Db_Table_Rowset
 getSelect ([string $dump = 'gid_geometry_label'], [ $options = array()]) Zend_Db_Select
 getSettings () array
 getUniqueColumnValues (string $field, [ $options = array()], array $optionsAvailable) array
 init () void
 joinTables (Zend_Db_Select $select, [ $options = array()]) void
 parseGeometryBeforeEdit (string $geometry) string
 setSettings (array $settings) void
 updateItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL],  $oldRow) bool
 _filter (Zend_Db_Select $select, [ $options = array()]) void
 _joinTablesCallback (Zend_Db_Select $select) void
 _publicFieldsCallback ( $fieldsArr, [ $options = array()]) array
 _querybuilder (Zend_Db_Select $select, [ $options = array()]) void
 _querybuilderCallback (Zend_Db_Select $select, [ $options = array()]) void
 _selectCallback (Zend_Db_Select $select, [ $options = array()]) void
Variables
static array $measurementFuncts = array(
"ST_Area" ,
"ST_Length" ,
"ST_Perimeter"
)
(line 109)

PostGIS measurement functions

  • access: public
integer $editScale (line 88)

From this scale edit is being enabled

  • access: public
Giscuit_Map_Layer_Vector $layer (line 120)

Layer

  • access: public
integer $searchScale (line 74)

Zoom to specified scale on search. Useful for point layers those bounding box could not be computed

  • access: public
integer $snapScale (line 81)

From this scale snap is being enabled

  • access: public
array $styleFields = array() (line 59)

List of additional fields that are pulled from the database at map rendering

  • access: public
integer $tolerance = 5 (line 66)

Tolerance in pixels. Used for info query

  • access: public
string $_defaultField = '' (line 102)

Table default field

  • access: protected
bool $_fetchData = true (line 52)

Is data from this table being fetched from the database

  • access: protected
array $_joinQueue = array() (line 95)

Holds the join statements

  • access: protected
string $_primary = 'gid' (line 38)

Table primary key name

  • access: protected

Redefinition of:
Giscuit_Db_Table_Abstract::$_primary
Table primary key name
array $_settings (line 45)

Holds layer settings

  • access: protected
Methods
Constructor __construct (line 128)

Constructor

  • access: public
void __construct ([array $options = array()])
  • array $options: Available options

Redefinition of:
Giscuit_Db_Table_Abstract::__construct()
Constructor

Redefined in descendants as:
addBbox (line 724)

Fetch rows that are in the maximum extents of the geometry represented by a BOX2D string

  • access: public
void addBbox (Zend_Db_Select $select, string $bbox)
  • Zend_Db_Select $select
  • string $bbox: Geometry represented by a BOX2D string
addItemForEditCallback (line 1231)

Add item

  • return: Row id
  • access: public
integer addItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL])
  • Zend_Db_Table_Row $row: New row
  • Zend_Form $form: Form object populated with request data

Redefined in descendants as:
addLabelFields (line 532)

Sets label user settings for current layer

  • access: public
array addLabelFields (Zend_Db_Select $select,  $fields)
  • Zend_Db_Select $select
  • array $fields: Fields
deleteItemForEditCallback (line 1258)

Delete item

  • return: Delete/don't delete item
  • access: public
bool deleteItemForEditCallback (integer $gid)
  • integer $gid: Row id

Redefined in descendants as:
formatInfoResults (line 800)

Format information results

  • access: public
void formatInfoResults (stdClass $itemField, string $name, mixed $value, Zend_Form $form)
  • stdClass $itemField
  • string $name
  • mixed $value
  • Zend_Form $form: Edit attributes form object of this layer
formatSearchResults (line 880)

Format search results

  • access: public
Zend_Db_Table_Rowset formatSearchResults (Zend_Db_Table_Rowset $rows, Zend_Form $form)
  • Zend_Db_Table_Rowset $rows
  • Zend_Form $form: Edit attributes form object of this layer
getArea (line 738)

Get area

  • access: protected
string getArea (string $geometry)
  • string $geometry: Geometry expression that can be represented by a field name or a string in WKT/GeoJSON format
getByField (line 643)

Get rows that have a $field LIKE $text

  • access: public
Zend_Db_Table_Rowset getByField (array $field, string $text, [ $options = array()])
  • array $field
  • string $text
  • array $options: Available options:
    • form Zend_Form - Edit attributes form object of this layer
    • bbox string - Fetch rows that are in the maximum extents of the geometry represented by a BOX2D string
    • limit integer - Number of rows to fecth
getByPoint (line 601)

Get data by point coordinates and pixel size

  • access: public
Zend_Db_Table_Rowset getByPoint (float $x, float $y, float $buffer, [ $options = array()])
  • float $x: North coordinate
  • float $y: East coordinate
  • float $buffer: Buffer size in meters
  • array $options: Available options:
    • form Zend_Form - Edit attributes form object of this layer
    • limit integer - Number of rows to fecth
getDefaultField (line 585)

Get the table default

This is used by the Information controller. It shows all the fields with their default field and then you click on one all the fields of the clicked row are shown.

  • access: public
string getDefaultField ()
getItemForAddCallback (line 1281)

Get item for add

  • access: public
void getItemForAddCallback ([Zend_Form $form = NULL])
  • Zend_Form $form: Form object populated with request data
getItemForEditCallback (line 1270)

Get item for edit

  • return: Updated row
  • access: public
Zend_Db_Table_Row getItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL])
  • Zend_Db_Table_Row $row: Updated row
  • Zend_Form $form: Form object populated with request data

Redefined in descendants as:
getItems (line 758)

Get items

  • access: public
Zend_Db_Table_Rowset getItems ([ $options = array()])
  • array $options: Available options:
    • geometryAsWkt bool - Return geometry in WKT format
    • whereIntersection string - Fetch rows that intersect specified table name and geometry (table.the_geom)
    • whereId integer - Fetch row with the specified id
getMaxAndMinValues (line 1169)

Get maximum and minimum value of a field

  • access: public
Zend_Db_Table_Rowset getMaxAndMinValues (Zend_Db_Table_Row $field)
  • Zend_Db_Table_Row $field: Field
getPublicFields (line 402)

Get an array of table fields

  • access: public
array getPublicFields ([ $options = array()])
  • array $options: Available options
getRandomValues (line 1199)

Get maximum and minimum value of a field

  • access: public
Zend_Db_Table_Rowset getRandomValues (Zend_Db_Table_Row $field, [ $options = array()])
  • Zend_Db_Table_Row $field: Field
  • array $options: Available options:
    • limit integer - Number of rows to fecth
getSelect (line 239)

Get the current select object of table

  • access: public
Zend_Db_Select getSelect ([string $dump = 'gid_geometry_label'], [ $options = array()])
  • string $dump: - What data should be requested from the layer (gid_geometry, gid_geometry_label, all, all_table, count)
  • array $options: Available options:
    • geometryAsWkt bool - Return geometry in WKT format
    • geometryAsGeoJSON bool - Return geometry in GeoJSON format
    • withIntersection string - Table name and geometry field (table.the_geom) that will be intersected with the current geometry. Returns the product of the intersection as the geometry.
    • whereIntersection string - Fetch rows that intersect specified table name and geometry (table.the_geom)
    • whereStm string - Fetch rows that match the specified statement
    • fields array - An array [[name, visibility, expr]] of additional field to fetch
    • form Zend_Form - Edit attributes form object of this layer
    • limit integer - Number of rows to fecth

Redefined in descendants as:
getSettings (line 219)

Get settings

  • access: public
array getSettings ()
getUniqueColumnValues (line 1128)

Fetch unique value of a column

  • return: Array of unique values of a column
  • access: public
array getUniqueColumnValues (string $field, [ $options = array()], array $optionsAvailable)
  • string $field: Column from which to fetch values
  • array $optionsAvailable: options:
    • limit integer - Number of rows to fecth
  • array $options
init (line 147)

Initialize

  • access: public
void init ()
joinTables (line 471)

Called after getSelect to join tables to current table

  • access: public
void joinTables (Zend_Db_Select $select, [ $options = array()])
  • Zend_Db_Select $select
  • array $options: Available options
parseGeometryBeforeEdit (line 1291)

Update geometry

  • return: Geometry represented as WKT
  • access: public
string parseGeometryBeforeEdit (string $geometry)
  • string $geometry: Geometry represented as WKT
setSettings (line 158)

Set settings

  • access: public
void setSettings (array $settings)
  • array $settings: Settings
updateItemForEditCallback (line 1245)

Update item

  • return: Update/don't update item
  • access: public
bool updateItemForEditCallback (Zend_Db_Table_Row $row, [Zend_Form $form = NULL],  $oldRow)
  • Zend_Db_Table_Row $row: Updated row
  • Zend_Form $form: Form object populated with request data
  • $oldRow

Redefined in descendants as:
_filter (line 518)

Filter select

  • access: protected
void _filter (Zend_Db_Select $select, [ $options = array()])
  • Zend_Db_Select $select
  • array $options: Available options
_joinTablesCallback (line 498)

Called after _joinTables

  • access: protected
void _joinTablesCallback (Zend_Db_Select $select)
  • Zend_Db_Select $select

Redefined in descendants as:
_publicFieldsCallback (line 459)

Called after getPublicFields

  • access: protected
array _publicFieldsCallback ( $fieldsArr, [ $options = array()])
  • array $fieldsArr
  • array $options: Available options

Redefined in descendants as:
_querybuilder (line 972)

Query builder

  • access: protected
void _querybuilder (Zend_Db_Select $select, [ $options = array()])
  • Zend_Db_Select $select
  • array $options: Available options:
    • querybuilder array - Query builder settings
_querybuilderCallback (line 1116)

Called after _querybuilder

  • access: protected
void _querybuilderCallback (Zend_Db_Select $select, [ $options = array()])
  • Zend_Db_Select $select
  • array $options: Available options

Redefined in descendants as:
_selectCallback (line 508)

Is called after getSelect to apply custom logic

  • access: protected
void _selectCallback (Zend_Db_Select $select, [ $options = array()])
  • Zend_Db_Select $select
  • array $options: Available options

Redefined in descendants as:

Inherited Methods

Inherited From Giscuit_Db_Table_Abstract

 Giscuit_Db_Table_Abstract::__construct()
 Giscuit_Db_Table_Abstract::count()
 Giscuit_Db_Table_Abstract::getPrimaryKey()
 Giscuit_Db_Table_Abstract::joinMultilangField()
 Giscuit_Db_Table_Abstract::moveItem()
 Giscuit_Db_Table_Abstract::whereActive()
 Giscuit_Db_Table_Abstract::whereCurrentUser()
 Giscuit_Db_Table_Abstract::whereId()

Documentation generated on Wed, 28 May 2014 08:33:10 +0000 by phpDocumentor 1.4.3