Mapbender 3.0.6.2 API documenation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • FOM
    • CoreBundle
      • Component
      • DependencyInjection
      • Doctrine
        • Types
      • Form
        • DataTransformer
        • Type
    • ManagerBundle
      • Component
      • Configuration
      • Controller
      • DependencyInjection
        • Compiler
      • Form
        • Type
      • Routing
    • UserBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
        • Factory
      • Entity
      • EventListener
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Firewall
  • Mapbender
    • Component
    • CoreBundle
      • Asset
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
          • Application
      • DependencyInjection
        • Compiler
      • Element
        • DataTransformer
        • EventListener
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
      • Tests
        • Controller
      • Utils
      • Validator
        • Constraints
    • DataSourceBundle
      • Component
        • Drivers
          • Interfaces
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Extension
      • Tests
    • DigitizerBundle
      • Component
      • Element
        • Type
      • Entity
      • Utils
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • KmlBundle
      • Element
    • ManagerBundle
      • Component
        • Exception
      • Controller
      • Form
        • DataTransformer
        • Type
      • Template
    • MobileBundle
      • DependencyInjection
      • Template
    • PrintBundle
      • Component
      • Element
        • Type
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
      • Tests
        • Component
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • DataTransformer
        • EventListener
        • Type
      • Entity
      • Event
      • Form
        • DataTransformer
        • EventListener
        • Type
  • None
  • OwsProxy3
    • CoreBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Entity
      • Event
      • EventListener
      • Worker
  • PHP

Classes

  • DataStore
  • DataStoreService
  • FeatureType
  • FeatureTypeService

Class FeatureType

Class FeatureType handles Feature objects.

Main goal of the handler is, to get manage GeoJSON Features for communication between OpenLayers and databases with spatial abilities like Oracle or PostgreSQL.

Symfony\Component\DependencyInjection\ContainerAware
Extended by Mapbender\DataSourceBundle\Component\DataStore
Extended by Mapbender\DataSourceBundle\Component\FeatureType
Namespace: Mapbender\DataSourceBundle\Component
Package: Mapbender\CoreBundle\Entity
Copyright: 2015 by WhereGroup GmbH & Co. KG
Author: Andriy Oblivantsev <eslider@gmail.com>
Link: https://github.com/mapbender/mapbender-digitizer
Located at data-source/Component/FeatureType.php

Methods summary

public
# __construct( Symfony\Component\DependencyInjection\ContainerInterface $container, null $args = null )

Parameters

$container
$args

Overrides

Mapbender\DataSourceBundle\Component\DataStore::__construct
public
# setGeomField( string $geomField )

Parameters

$geomField
public
# setSrid( integer $srid )

Parameters

$srid
public array
# setFields( array $fields )

Parameters

$fields

Returns

array
array
public Mapbender\DataSourceBundle\Entity\Feature
# getById( integer $id, integer $srid = null )

Get feature by ID and SRID

Get feature by ID and SRID

Parameters

$id
$srid
SRID

Returns

Mapbender\DataSourceBundle\Entity\Feature
Feature

Overrides

Mapbender\DataSourceBundle\Component\DataStore::getById
public Mapbender\DataSourceBundle\Entity\DataItem|Mapbender\DataSourceBundle\Entity\Feature
# save( array|Mapbender\DataSourceBundle\Entity\Feature|Mapbender\DataSourceBundle\Entity\DataItem $featureData, boolean $autoUpdate = true )

Save feature

Save feature

Parameters

$featureData
$autoUpdate
update instead of insert if ID given

Returns

Mapbender\DataSourceBundle\Entity\DataItem|Mapbender\DataSourceBundle\Entity\Feature
DataItem|Feature

Throws

Exception
\Exception

Overrides

Mapbender\DataSourceBundle\Component\DataStore::save
public Mapbender\DataSourceBundle\Entity\Feature
# insert( array|Mapbender\DataSourceBundle\Entity\Feature $featureData )

Insert feature

Insert feature

Parameters

$featureData

Returns

Mapbender\DataSourceBundle\Entity\Feature
Feature
public boolean|string
# transformEwkt( string $ewkt, null|integer $srid = null )

Parameters

$ewkt
EWKT geometry
$srid
SRID

Returns

boolean|string
bool|string

Throws

Exception
\Exception
public Mapbender\DataSourceBundle\Entity\Feature
# update( mixed $featureData )

Update

Update

Parameters

$featureData

Returns

Mapbender\DataSourceBundle\Entity\Feature
Feature

Throws

Exception
\Exception
public Mapbender\DataSourceBundle\Entity\Feature[]
# search( array $criteria = array() )

Search feature by criteria

Search feature by criteria

Parameters

$criteria

Returns

Mapbender\DataSourceBundle\Entity\Feature[]
Feature[]

Overrides

Mapbender\DataSourceBundle\Component\DataStore::search
public mixed
# getUniqueId( )

Get unique ID

Get unique ID

Returns

mixed
unique ID
public string
# getTableName( )

Returns

string
string
public string
# getGeomField( )

Returns

string
string
public array
# getFields( )

Returns

array
array
public Mapbender\DataSourceBundle\Entity\Feature[]
# prepareResults( Mapbender\DataSourceBundle\Entity\Feature[] & $rows, null $srid = null )

Convert results to Feature objects

Convert results to Feature objects

Parameters

$rows
$srid

Returns

Mapbender\DataSourceBundle\Entity\Feature[]
Feature[]
public Doctrine\DBAL\Query\QueryBuilder
# getSelectQueryBuilder( null $srid = null )

Get query builder prepared to select from the source table

Get query builder prepared to select from the source table

Parameters

$srid

Returns

Doctrine\DBAL\Query\QueryBuilder
QueryBuilder
public Mapbender\DataSourceBundle\Entity\Feature
# create( mixed $args )

Cast feature by $args

Cast feature by $args

Parameters

$args

Returns

Mapbender\DataSourceBundle\Entity\Feature
Feature

Overrides

Mapbender\DataSourceBundle\Component\DataStore::create
public integer
# getSrid( )

Get SRID

Get SRID

Returns

integer
int
public array
# toFeatureCollection( Mapbender\DataSourceBundle\Entity\Feature[] $rows )

Convert Features[] to FeatureCollection

Convert Features[] to FeatureCollection

Parameters

$rows

Returns

array
FeatureCollection
public boolean
# addGeometryColumn( string $tableName, string $type, string $srid, string $geomFieldName = "geom", string $schemaName = "public", integer $dimensions = 2 )

Add geometry column

Add geometry column

Parameters

$tableName
$type
$srid
$geomFieldName
$schemaName
$dimensions

Returns

boolean
bool

Throws

Doctrine\DBAL\DBALException
\Doctrine\DBAL\DBALException
public
# setWaysTableName( string $waysTableName )

Parameters

$waysTableName
public
# setWaysGeomFieldName( string $waysGeomFieldName )

Parameters

$waysGeomFieldName
public string
# getWaysVerticesTableName( )

Returns

string
string
public
# setWaysVerticesTableName( string $waysVerticesTableName )

Parameters

$waysVerticesTableName
protected
# setFilter( mixed $sqlFilter )

Set FeatureType permanent SQL filter used by $this->search() https://trac.wheregroup.com/cp/issues/3733

Set FeatureType permanent SQL filter used by $this->search() https://trac.wheregroup.com/cp/issues/3733

Parameters

$sqlFilter

See

$this->search()
public string
# getTableSequenceName( )

Get sequence name

Get sequence name

Returns

string
sequence name

Throws

Doctrine\DBAL\DBALException
\Doctrine\DBAL\DBALException
public integer
# repairTableSequence( )

Repair table sequence. Set sequence next ID to (highest ID + 1) in the table

Repair table sequence. Set sequence next ID to (highest ID + 1) in the table

Returns

integer
last insert ID

Throws

Doctrine\DBAL\DBALException
\Doctrine\DBAL\DBALException
public string
# getFileUri( null $fieldName = null )

Get files directory, relative to base upload directory

Get files directory, relative to base upload directory

Parameters

$fieldName

Returns

string
string
public string
# getFilePath( null $fieldName = null, boolean $createPath = true )

Get files base path

Get files base path

Parameters

$fieldName
file field name
$createPath
check and create path?

Returns

string
string
public string
# getFileUrl( string $fieldName = "" )

Parameters

$fieldName

Returns

string
string
public string
# genFilePath( null $fieldName = null )

Generate unique file name for a field.

Generate unique file name for a field.

Parameters

$fieldName
Field

Returns

string
string
public
# setFiles( mixed $fileInfo )

Parameters

$fileInfo
public array
# getFileInfo( )

Returns

array
array
public mixed|null
# getGeomType( mixed $tableName, string $schema = null )

Parameters

$tableName
$schema

Returns

mixed|null
mixed|null
public static string
# getWktType( mixed $wkt )

Detect (E)WKT geometry type

Detect (E)WKT geometry type

Parameters

$wkt

Returns

string
string
public Mapbender\DataSourceBundle\Entity\Feature[]
# routeBetweenGeom( string $sourceGeom, string $targetGeom )

Get route nodes between geometries

Get route nodes between geometries

Parameters

$sourceGeom
EWKT geometry
$targetGeom
EWKT geometry

Returns

Mapbender\DataSourceBundle\Entity\Feature[]
Feature[]
public array
# toArray( )

Returns

array
array
public
# getByIds( mixed $ids, mixed $prepareResults = true )

Get by ID list

Get by ID list

Parameters

$ids
$prepareResults
public array|mixed|null
# getConfiguration( string $key = null )

Get feature type configuration by key name

Get feature type configuration by key name

Parameters

$key
Key name

Returns

array|mixed|null
array|mixed|null
public array
# export( array & $rows )

Export by ID's

Export by ID's

Parameters

$rows

Returns

array
array

Methods inherited from Mapbender\DataSourceBundle\Component\DataStore

connect(), get(), getConnection(), getDriver(), getParent(), getParentField(), getPlatformName(), getTree(), getTroughMapping(), getTypes(), isOracle(), isPostgres(), isSqlite(), preventRemove(), preventSave(), remove(), secureEval(), setMapping(), setParentField()

Magic methods summary

Constants summary

string UPLOAD_DIR_NAME

Default upload directory

Default upload directory

#"featureTypes"
string EVENT_ON_BEFORE_UPDATE

Events

Events

#'onBeforeUpdate'
string EVENT_ON_AFTER_UPDATE
#'onAfterUpdate'
string EVENT_ON_BEFORE_INSERT
#'onBeforeInsert'
string EVENT_ON_AFTER_INSERT
#'onAfterInsert'
integer MAX_RESULTS

Default max results by search

Default max results by search

#5000

Constants inherited from Mapbender\DataSourceBundle\Component\DataStore

EVENT_ON_AFTER_REMOVE, EVENT_ON_AFTER_SAVE, EVENT_ON_AFTER_SEARCH, EVENT_ON_BEFORE_REMOVE, EVENT_ON_BEFORE_SAVE, EVENT_ON_BEFORE_SEARCH, ORACLE_PLATFORM, POSTGRESQL_PLATFORM, SQLITE_PLATFORM

Properties summary

protected string $geomField

Geometry field name

Geometry field name

#'geom'
protected integer $srid

SRID to get geometry converted to

SRID to get geometry converted to

#null
protected string $sqlFilter

SQL where filter

SQL where filter

#
protected array $filesInfo

file info list

file info list

#array()
protected string $waysTableName

Routing ways node table name.

Routing ways node table name.

#"ways"
protected string $waysVerticesTableName

Way vertices table name

Way vertices table name

#'ways_vertices_pgr'
protected string $waysGeomFieldName

Routing ways geometry field name

Routing ways geometry field name

#"the_geom"
protected boolean $allowInsert

Allow insert feature flag

Allow insert feature flag

#
protected boolean $allowUpdate

Allow update feature flag

Allow update feature flag

#
protected array $_args

Initial arguments

Initial arguments

#array()

Properties inherited from Mapbender\DataSourceBundle\Component\DataStore

$allowRemove, $allowSave, $connectionName, $connectionType, $driver, $events, $fields, $mapping, $parentField

Mapbender 3.0.6.2 API documenation API documentation generated by ApiGen 2.8.0