From 07245c1e420bc3b12906174af03590d714fca1db Mon Sep 17 00:00:00 2001 From: stubbfel Date: Thu, 27 Jun 2013 11:54:59 +0200 Subject: [PATCH] add doku --- doc/404.html | 11 +- doc/class-ArrayAccess.html | 4 +- doc/class-ArrayIterator.html | 4 +- doc/class-Countable.html | 4 +- doc/class-ErrorException.html | 4 +- doc/class-Exception.html | 4 +- doc/class-InvalidArgumentException.html | 4 +- doc/class-Iterator.html | 4 +- doc/class-IteratorAggregate.html | 4 +- doc/class-LogicException.html | 4 +- doc/class-RuntimeException.html | 4 +- doc/class-SeekableIterator.html | 4 +- doc/class-Serializable.html | 4 +- doc/class-SimpleXMLElement.html | 4 +- doc/class-Slim.Environment.html | 4 +- doc/class-Slim.Exception.Pass.html | 4 +- doc/class-Slim.Exception.Stop.html | 4 +- doc/class-Slim.Http.Headers.html | 4 +- doc/class-Slim.Http.Request.html | 4 +- doc/class-Slim.Http.Response.html | 4 +- doc/class-Slim.Http.Util.html | 4 +- doc/class-Slim.Log.html | 4 +- doc/class-Slim.LogWriter.html | 4 +- doc/class-Slim.Middleware.ContentTypes.html | 4 +- doc/class-Slim.Middleware.Flash.html | 4 +- doc/class-Slim.Middleware.MethodOverride.html | 4 +- ...lass-Slim.Middleware.PrettyExceptions.html | 4 +- doc/class-Slim.Middleware.SessionCookie.html | 4 +- doc/class-Slim.Middleware.html | 4 +- doc/class-Slim.Route.html | 4 +- doc/class-Slim.Router.html | 4 +- doc/class-Slim.Slim.html | 6 +- doc/class-Slim.View.html | 4 +- doc/class-Traversable.html | 4 +- doc/class-api.Api.html | 14 +- doc/class-api.PisApi.html | 430 ++++++++++++++++++ doc/class-api.PssApi.html | 430 ++++++++++++++++++ doc/class-api.SpsApi.html | 314 ++++++++++++- doc/class-config.DBConfig.html | 18 +- doc/class-database.PisSqlManager.html | 364 +++++++++++++++ doc/class-database.PssSqlManager.html | 391 ++++++++++++++++ doc/class-database.SpsSqlManager.html | 121 ++++- doc/class-database.SqlManager.html | 102 ++++- doc/class-utiliy.ArrayManager.html | 292 ++++++++++++ doc/class-utiliy.StringManager.html | 320 +++++++++++++ doc/class-utiliy.XmlManager.html | 296 ++++++++++++ doc/elementlist.js | 2 +- doc/index.html | 12 + doc/namespace-PHP.html | 4 +- doc/namespace-Slim.Exception.html | 4 +- doc/namespace-Slim.Http.html | 4 +- doc/namespace-Slim.Middleware.html | 4 +- doc/namespace-Slim.html | 4 +- doc/namespace-api.html | 14 +- doc/namespace-config.html | 4 +- doc/namespace-database.html | 14 +- doc/namespace-utiliy.html | 128 ++++++ doc/source-class-Slim.Environment.html | 4 +- doc/source-class-Slim.Exception.Pass.html | 4 +- doc/source-class-Slim.Exception.Stop.html | 4 +- doc/source-class-Slim.Http.Headers.html | 4 +- doc/source-class-Slim.Http.Request.html | 4 +- doc/source-class-Slim.Http.Response.html | 4 +- doc/source-class-Slim.Http.Util.html | 4 +- doc/source-class-Slim.Log.html | 4 +- doc/source-class-Slim.LogWriter.html | 4 +- ...ce-class-Slim.Middleware.ContentTypes.html | 4 +- doc/source-class-Slim.Middleware.Flash.html | 4 +- ...-class-Slim.Middleware.MethodOverride.html | 4 +- ...lass-Slim.Middleware.PrettyExceptions.html | 4 +- ...e-class-Slim.Middleware.SessionCookie.html | 4 +- doc/source-class-Slim.Middleware.html | 4 +- doc/source-class-Slim.Route.html | 4 +- doc/source-class-Slim.Router.html | 4 +- doc/source-class-Slim.Slim.html | 4 +- doc/source-class-Slim.View.html | 4 +- doc/source-class-api.Api.html | 48 +- doc/source-class-api.PisApi.html | 167 +++++++ doc/source-class-api.PssApi.html | 169 +++++++ doc/source-class-api.SpsApi.html | 263 +++++++++-- doc/source-class-config.DBConfig.html | 59 ++- doc/source-class-database.PisSqlManager.html | 194 ++++++++ doc/source-class-database.PssSqlManager.html | 202 ++++++++ doc/source-class-database.SpsSqlManager.html | 282 ++++++++++-- doc/source-class-database.SqlManager.html | 170 ++++--- doc/source-class-utiliy.ArrayManager.html | 166 +++++++ doc/source-class-utiliy.StringManager.html | 160 +++++++ doc/tree.html | 62 ++- 88 files changed, 5144 insertions(+), 305 deletions(-) create mode 100644 doc/class-api.PisApi.html create mode 100644 doc/class-api.PssApi.html create mode 100644 doc/class-database.PisSqlManager.html create mode 100644 doc/class-database.PssSqlManager.html create mode 100644 doc/class-utiliy.ArrayManager.html create mode 100644 doc/class-utiliy.StringManager.html create mode 100644 doc/class-utiliy.XmlManager.html create mode 100644 doc/namespace-utiliy.html create mode 100644 doc/source-class-api.PisApi.html create mode 100644 doc/source-class-api.PssApi.html create mode 100644 doc/source-class-database.PisSqlManager.html create mode 100644 doc/source-class-database.PssSqlManager.html create mode 100644 doc/source-class-utiliy.ArrayManager.html create mode 100644 doc/source-class-utiliy.StringManager.html diff --git a/doc/404.html b/doc/404.html index b4fe02e..b673575 100644 --- a/doc/404.html +++ b/doc/404.html @@ -8,7 +8,7 @@ Page not found | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -49,9 +51,13 @@

    Classes

    Interfaces

    diff --git a/doc/class-ArrayAccess.html b/doc/class-ArrayAccess.html index 9d56c97..7bc3ae0 100644 --- a/doc/class-ArrayAccess.html +++ b/doc/class-ArrayAccess.html @@ -7,7 +7,7 @@ Interface ArrayAccess | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-ArrayIterator.html b/doc/class-ArrayIterator.html index b66ee96..7a3a16b 100644 --- a/doc/class-ArrayIterator.html +++ b/doc/class-ArrayIterator.html @@ -7,7 +7,7 @@ Class ArrayIterator | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Countable.html b/doc/class-Countable.html index 4713732..36de61b 100644 --- a/doc/class-Countable.html +++ b/doc/class-Countable.html @@ -7,7 +7,7 @@ Interface Countable | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-ErrorException.html b/doc/class-ErrorException.html index bae1efe..6cce829 100644 --- a/doc/class-ErrorException.html +++ b/doc/class-ErrorException.html @@ -7,7 +7,7 @@ Class ErrorException | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Exception.html b/doc/class-Exception.html index b120e26..56f1342 100644 --- a/doc/class-Exception.html +++ b/doc/class-Exception.html @@ -7,7 +7,7 @@ Class Exception | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-InvalidArgumentException.html b/doc/class-InvalidArgumentException.html index c066aba..e9ccb9e 100644 --- a/doc/class-InvalidArgumentException.html +++ b/doc/class-InvalidArgumentException.html @@ -7,7 +7,7 @@ Class InvalidArgumentException | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Iterator.html b/doc/class-Iterator.html index d42b50c..66da5a0 100644 --- a/doc/class-Iterator.html +++ b/doc/class-Iterator.html @@ -7,7 +7,7 @@ Interface Iterator | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-IteratorAggregate.html b/doc/class-IteratorAggregate.html index 4da8bdc..0bc380a 100644 --- a/doc/class-IteratorAggregate.html +++ b/doc/class-IteratorAggregate.html @@ -7,7 +7,7 @@ Interface IteratorAggregate | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-LogicException.html b/doc/class-LogicException.html index bf96155..e2612f8 100644 --- a/doc/class-LogicException.html +++ b/doc/class-LogicException.html @@ -7,7 +7,7 @@ Class LogicException | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-RuntimeException.html b/doc/class-RuntimeException.html index 2216a33..c0e0f5e 100644 --- a/doc/class-RuntimeException.html +++ b/doc/class-RuntimeException.html @@ -7,7 +7,7 @@ Class RuntimeException | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-SeekableIterator.html b/doc/class-SeekableIterator.html index ada9274..9a3d911 100644 --- a/doc/class-SeekableIterator.html +++ b/doc/class-SeekableIterator.html @@ -7,7 +7,7 @@ Interface SeekableIterator | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Serializable.html b/doc/class-Serializable.html index 742739b..5b90da2 100644 --- a/doc/class-Serializable.html +++ b/doc/class-Serializable.html @@ -7,7 +7,7 @@ Interface Serializable | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-SimpleXMLElement.html b/doc/class-SimpleXMLElement.html index 50cc576..3377f14 100644 --- a/doc/class-SimpleXMLElement.html +++ b/doc/class-SimpleXMLElement.html @@ -7,7 +7,7 @@ Class SimpleXMLElement | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Environment.html b/doc/class-Slim.Environment.html index 336402e..521ea23 100644 --- a/doc/class-Slim.Environment.html +++ b/doc/class-Slim.Environment.html @@ -7,7 +7,7 @@ Class Slim\Environment | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Exception.Pass.html b/doc/class-Slim.Exception.Pass.html index b798957..cc47737 100644 --- a/doc/class-Slim.Exception.Pass.html +++ b/doc/class-Slim.Exception.Pass.html @@ -7,7 +7,7 @@ Class Slim\Exception\Pass | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Exception.Stop.html b/doc/class-Slim.Exception.Stop.html index 35f53de..15bf766 100644 --- a/doc/class-Slim.Exception.Stop.html +++ b/doc/class-Slim.Exception.Stop.html @@ -7,7 +7,7 @@ Class Slim\Exception\Stop | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Http.Headers.html b/doc/class-Slim.Http.Headers.html index 9138fbb..cd55e2d 100644 --- a/doc/class-Slim.Http.Headers.html +++ b/doc/class-Slim.Http.Headers.html @@ -7,7 +7,7 @@ Class Slim\Http\Headers | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Http.Request.html b/doc/class-Slim.Http.Request.html index 983c841..b969650 100644 --- a/doc/class-Slim.Http.Request.html +++ b/doc/class-Slim.Http.Request.html @@ -7,7 +7,7 @@ Class Slim\Http\Request | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Http.Response.html b/doc/class-Slim.Http.Response.html index 552c269..cae4199 100644 --- a/doc/class-Slim.Http.Response.html +++ b/doc/class-Slim.Http.Response.html @@ -7,7 +7,7 @@ Class Slim\Http\Response | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Http.Util.html b/doc/class-Slim.Http.Util.html index e75c21d..01f4377 100644 --- a/doc/class-Slim.Http.Util.html +++ b/doc/class-Slim.Http.Util.html @@ -7,7 +7,7 @@ Class Slim\Http\Util | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Log.html b/doc/class-Slim.Log.html index 24d6227..94cf6c6 100644 --- a/doc/class-Slim.Log.html +++ b/doc/class-Slim.Log.html @@ -7,7 +7,7 @@ Class Slim\Log | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.LogWriter.html b/doc/class-Slim.LogWriter.html index 1983268..739df52 100644 --- a/doc/class-Slim.LogWriter.html +++ b/doc/class-Slim.LogWriter.html @@ -7,7 +7,7 @@ Class Slim\LogWriter | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.ContentTypes.html b/doc/class-Slim.Middleware.ContentTypes.html index 7062eb4..aae9b20 100644 --- a/doc/class-Slim.Middleware.ContentTypes.html +++ b/doc/class-Slim.Middleware.ContentTypes.html @@ -7,7 +7,7 @@ Class Slim\Middleware\ContentTypes | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.Flash.html b/doc/class-Slim.Middleware.Flash.html index d53aea2..86566b5 100644 --- a/doc/class-Slim.Middleware.Flash.html +++ b/doc/class-Slim.Middleware.Flash.html @@ -7,7 +7,7 @@ Class Slim\Middleware\Flash | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.MethodOverride.html b/doc/class-Slim.Middleware.MethodOverride.html index 53e2575..f2ffa38 100644 --- a/doc/class-Slim.Middleware.MethodOverride.html +++ b/doc/class-Slim.Middleware.MethodOverride.html @@ -7,7 +7,7 @@ Class Slim\Middleware\MethodOverride | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.PrettyExceptions.html b/doc/class-Slim.Middleware.PrettyExceptions.html index 012489f..661bb9f 100644 --- a/doc/class-Slim.Middleware.PrettyExceptions.html +++ b/doc/class-Slim.Middleware.PrettyExceptions.html @@ -7,7 +7,7 @@ Class Slim\Middleware\PrettyExceptions | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.SessionCookie.html b/doc/class-Slim.Middleware.SessionCookie.html index 54ca763..ec6d511 100644 --- a/doc/class-Slim.Middleware.SessionCookie.html +++ b/doc/class-Slim.Middleware.SessionCookie.html @@ -7,7 +7,7 @@ Class Slim\Middleware\SessionCookie | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Middleware.html b/doc/class-Slim.Middleware.html index 6563e76..1f19910 100644 --- a/doc/class-Slim.Middleware.html +++ b/doc/class-Slim.Middleware.html @@ -7,7 +7,7 @@ Class Slim\Middleware | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Route.html b/doc/class-Slim.Route.html index 12401e7..856acfa 100644 --- a/doc/class-Slim.Route.html +++ b/doc/class-Slim.Route.html @@ -7,7 +7,7 @@ Class Slim\Route | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Router.html b/doc/class-Slim.Router.html index 88eb65f..56af795 100644 --- a/doc/class-Slim.Router.html +++ b/doc/class-Slim.Router.html @@ -7,7 +7,7 @@ Class Slim\Router | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Slim.Slim.html b/doc/class-Slim.Slim.html index 0a0800a..795724e 100644 --- a/doc/class-Slim.Slim.html +++ b/doc/class-Slim.Slim.html @@ -7,7 +7,7 @@ Class Slim\Slim | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -115,6 +117,8 @@

    Indirect known subclasses

    + api\PisApi, + api\PssApi, api\SpsApi
    diff --git a/doc/class-Slim.View.html b/doc/class-Slim.View.html index c4950ed..33efb6d 100644 --- a/doc/class-Slim.View.html +++ b/doc/class-Slim.View.html @@ -7,7 +7,7 @@ Class Slim\View | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-Traversable.html b/doc/class-Traversable.html index eac3259..20ca2d8 100644 --- a/doc/class-Traversable.html +++ b/doc/class-Traversable.html @@ -7,7 +7,7 @@ Interface Traversable | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/class-api.Api.html b/doc/class-api.Api.html index 2018d36..c0bb3aa 100644 --- a/doc/class-api.Api.html +++ b/doc/class-api.Api.html @@ -7,7 +7,7 @@ Class api\Api | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -48,6 +50,8 @@

    Classes

    @@ -118,6 +122,8 @@

    Direct known subclasses

    + api\PisApi, + api\PssApi, api\SpsApi
    @@ -136,7 +142,7 @@ stubbfel
    Since: 20.06.2013
    - Located at api/Api.php
    + Located at api/Api.php
    @@ -189,7 +195,7 @@
    # - __destruct( ) + __destruct( )
    @@ -222,7 +228,7 @@
    # - connect( ) + connect( )
    diff --git a/doc/class-api.PisApi.html b/doc/class-api.PisApi.html new file mode 100644 index 0000000..d71d156 --- /dev/null +++ b/doc/class-api.PisApi.html @@ -0,0 +1,430 @@ + + + + + + + Class api\PisApi | GeoApi + + + + + + + + +
    + +
    + +
    + + + + diff --git a/doc/class-api.PssApi.html b/doc/class-api.PssApi.html new file mode 100644 index 0000000..7d45c90 --- /dev/null +++ b/doc/class-api.PssApi.html @@ -0,0 +1,430 @@ + + + + + + + Class api\PssApi | GeoApi + + + + + + + + +
    + +
    + +
    + + + + diff --git a/doc/class-api.SpsApi.html b/doc/class-api.SpsApi.html index a548592..70b9db1 100644 --- a/doc/class-api.SpsApi.html +++ b/doc/class-api.SpsApi.html @@ -7,7 +7,7 @@ Class api\SpsApi | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -48,6 +50,8 @@

    Classes

    @@ -139,7 +143,7 @@ stubbfel
    Since: 20.06.2013
    - Located at api/SpsApi.php
    + Located at api/SpsApi.php
    @@ -157,7 +161,7 @@
    # - __construct( ) + __construct( )
    @@ -192,7 +196,7 @@
    # - __destruct( ) + __destruct( )
    @@ -216,28 +220,28 @@
    - + public - array[num] + querry
    - # - sendSpsQuery( array $queryArgs = array() ) + # + sendSpsAliasQuery( array $queryArgs )
    -

    Method stert a sps-query

    +

    Method start a sps-query(alias)

    +
    + + + + + public + querry + + + + +
    + # + sendSpsCoordinateQuery( array $queryArgs ) + +
    + +

    Method start a sps-query(Coordinates)

    + +
    + + diff --git a/doc/namespace-Slim.Exception.html b/doc/namespace-Slim.Exception.html index efa4562..f344cd1 100644 --- a/doc/namespace-Slim.Exception.html +++ b/doc/namespace-Slim.Exception.html @@ -7,7 +7,7 @@ Namespace Slim\Exception | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/namespace-Slim.Http.html b/doc/namespace-Slim.Http.html index 0d85c59..0f9426d 100644 --- a/doc/namespace-Slim.Http.html +++ b/doc/namespace-Slim.Http.html @@ -7,7 +7,7 @@ Namespace Slim\Http | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/namespace-Slim.Middleware.html b/doc/namespace-Slim.Middleware.html index 58d328f..4876805 100644 --- a/doc/namespace-Slim.Middleware.html +++ b/doc/namespace-Slim.Middleware.html @@ -7,7 +7,7 @@ Namespace Slim\Middleware | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/namespace-Slim.html b/doc/namespace-Slim.html index e634c1b..c4ed64f 100644 --- a/doc/namespace-Slim.html +++ b/doc/namespace-Slim.html @@ -7,7 +7,7 @@ Namespace Slim | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/namespace-api.html b/doc/namespace-api.html index 83c011f..83c28f8 100644 --- a/doc/namespace-api.html +++ b/doc/namespace-api.html @@ -7,7 +7,7 @@ Namespace api | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -48,6 +50,8 @@

    Classes

    @@ -101,6 +105,14 @@ This class provides some general API methods + + PisApi + This class provides some spezial PisAPI methods + + + PssApi + This class provides some spezial PssAPI methods + SpsApi This class provides some spezial SpsAPI methods diff --git a/doc/namespace-config.html b/doc/namespace-config.html index 3a93ef8..c8aa9e0 100644 --- a/doc/namespace-config.html +++ b/doc/namespace-config.html @@ -7,7 +7,7 @@ Namespace config | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/namespace-database.html b/doc/namespace-database.html index 293420b..89dfb22 100644 --- a/doc/namespace-database.html +++ b/doc/namespace-database.html @@ -7,7 +7,7 @@ Namespace database | GeoApi - + @@ -38,6 +38,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -47,6 +49,8 @@

    Classes

    @@ -96,6 +100,14 @@ + + + + + + + + diff --git a/doc/namespace-utiliy.html b/doc/namespace-utiliy.html new file mode 100644 index 0000000..1b90270 --- /dev/null +++ b/doc/namespace-utiliy.html @@ -0,0 +1,128 @@ + + + + + + + Namespace utiliy | GeoApi + + + + + + + + +
    + +
    + +
    + +
    Classes summary
    PisSqlManagerDescription of PisSqlManager
    PssSqlManagerDescription of PssSqlManager
    SpsSqlManager Description of SpsSqlManager
    + + + + + + + + + + + + + +
    Classes summary
    ArrayManagerThe ArrayManager provides some array-methods
    StringManagerThe StringManager provides some string-methods
    XmlManagerThe XmlManager provides some xml-methods
    + + + + + +
    + + + + + + diff --git a/doc/source-class-Slim.Environment.html b/doc/source-class-Slim.Environment.html index 210918b..642daf5 100644 --- a/doc/source-class-Slim.Environment.html +++ b/doc/source-class-Slim.Environment.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Environment.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Exception.Pass.html b/doc/source-class-Slim.Exception.Pass.html index 9685aa2..5453d1c 100644 --- a/doc/source-class-Slim.Exception.Pass.html +++ b/doc/source-class-Slim.Exception.Pass.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Exception/Pass.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Exception.Stop.html b/doc/source-class-Slim.Exception.Stop.html index d660562..839b2ea 100644 --- a/doc/source-class-Slim.Exception.Stop.html +++ b/doc/source-class-Slim.Exception.Stop.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Exception/Stop.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Http.Headers.html b/doc/source-class-Slim.Http.Headers.html index 6cd6766..a0025a2 100644 --- a/doc/source-class-Slim.Http.Headers.html +++ b/doc/source-class-Slim.Http.Headers.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Http/Headers.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Http.Request.html b/doc/source-class-Slim.Http.Request.html index 4957877..f7a34c1 100644 --- a/doc/source-class-Slim.Http.Request.html +++ b/doc/source-class-Slim.Http.Request.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Http/Request.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Http.Response.html b/doc/source-class-Slim.Http.Response.html index fd4a74e..89ed45c 100644 --- a/doc/source-class-Slim.Http.Response.html +++ b/doc/source-class-Slim.Http.Response.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Http/Response.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Http.Util.html b/doc/source-class-Slim.Http.Util.html index 143fea2..86ee4f0 100644 --- a/doc/source-class-Slim.Http.Util.html +++ b/doc/source-class-Slim.Http.Util.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Http/Util.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Log.html b/doc/source-class-Slim.Log.html index 6a9cac5..a112139 100644 --- a/doc/source-class-Slim.Log.html +++ b/doc/source-class-Slim.Log.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Log.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.LogWriter.html b/doc/source-class-Slim.LogWriter.html index 77561e8..a8b40d1 100644 --- a/doc/source-class-Slim.LogWriter.html +++ b/doc/source-class-Slim.LogWriter.html @@ -8,7 +8,7 @@ File thirdparty/Slim/LogWriter.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.ContentTypes.html b/doc/source-class-Slim.Middleware.ContentTypes.html index d077d15..26429cc 100644 --- a/doc/source-class-Slim.Middleware.ContentTypes.html +++ b/doc/source-class-Slim.Middleware.ContentTypes.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware/ContentTypes.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.Flash.html b/doc/source-class-Slim.Middleware.Flash.html index 95e7dda..345ba69 100644 --- a/doc/source-class-Slim.Middleware.Flash.html +++ b/doc/source-class-Slim.Middleware.Flash.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware/Flash.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.MethodOverride.html b/doc/source-class-Slim.Middleware.MethodOverride.html index dfcd6bd..894c35f 100644 --- a/doc/source-class-Slim.Middleware.MethodOverride.html +++ b/doc/source-class-Slim.Middleware.MethodOverride.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware/MethodOverride.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.PrettyExceptions.html b/doc/source-class-Slim.Middleware.PrettyExceptions.html index 5f9f922..5480fa2 100644 --- a/doc/source-class-Slim.Middleware.PrettyExceptions.html +++ b/doc/source-class-Slim.Middleware.PrettyExceptions.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware/PrettyExceptions.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.SessionCookie.html b/doc/source-class-Slim.Middleware.SessionCookie.html index 440ada6..a1303bf 100644 --- a/doc/source-class-Slim.Middleware.SessionCookie.html +++ b/doc/source-class-Slim.Middleware.SessionCookie.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware/SessionCookie.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Middleware.html b/doc/source-class-Slim.Middleware.html index 4dd7fcc..f63bde7 100644 --- a/doc/source-class-Slim.Middleware.html +++ b/doc/source-class-Slim.Middleware.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Middleware.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Route.html b/doc/source-class-Slim.Route.html index e6c2c8b..eb20c54 100644 --- a/doc/source-class-Slim.Route.html +++ b/doc/source-class-Slim.Route.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Route.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Router.html b/doc/source-class-Slim.Router.html index eb0b4cc..4273295 100644 --- a/doc/source-class-Slim.Router.html +++ b/doc/source-class-Slim.Router.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Router.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.Slim.html b/doc/source-class-Slim.Slim.html index 86cd2ee..a2651a0 100644 --- a/doc/source-class-Slim.Slim.html +++ b/doc/source-class-Slim.Slim.html @@ -8,7 +8,7 @@ File thirdparty/Slim/Slim.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-Slim.View.html b/doc/source-class-Slim.View.html index 9accc67..1e54fd3 100644 --- a/doc/source-class-Slim.View.html +++ b/doc/source-class-Slim.View.html @@ -8,7 +8,7 @@ File thirdparty/Slim/View.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • diff --git a/doc/source-class-api.Api.html b/doc/source-class-api.Api.html index a0a4f7c..4e4880c 100644 --- a/doc/source-class-api.Api.html +++ b/doc/source-class-api.Api.html @@ -8,7 +8,7 @@ File api/Api.php | GeoApi - + @@ -39,6 +39,8 @@
  • Middleware
  • +
  • utiliy +
  • @@ -49,6 +51,8 @@

    Classes

    @@ -118,31 +122,35 @@ 24: * Default-Constructor 25: */ 26: public function __construct() { -27: if (!$this->sqlManager) { -28: $this->sqlManager = new \database\SQLManager(); -29: } -30: $this->connect(); -31: parent::__construct(); +27: $this->connect(); +28: parent::__construct(); +29: +30: // set content type td xml +31: $this->contentType("Content-type: application/xml;charset=utf-8"); 32: } 33: 34: /** 35: * Default-DeConstructor 36: */ 37: public function __destruct() { -38: $this->sqlManager = null; -39: } -40: -41: /** -42: * Method start a connection to the database -43: */ -44: public function connect() { -45: $this->sqlManager->connect(); -46: } -47: -48: } -49: -50: ?> -51: +38: +39: // destroy the sqlManager +40: $this->sqlManager->closeConnection(); +41: unset($this->sqlManager); +42: $this->sqlManager = null; +43: } +44: +45: /** +46: * Method start a connection to the database +47: */ +48: public function connect() { +49: $this->sqlManager->connect(); +50: } +51: +52: } +53: +54: ?> +55: @@ -49,6 +51,8 @@

    Classes

    @@ -92,49 +96,220 @@ -
     1: <?php
    - 2: 
    - 3: namespace api;
    - 4: 
    - 5: include_once "../../global.inc.php";
    - 6: include_once PATH_DATABASE . "/SpsSqlManager.php";
    - 7: require_once PATH_API . "/Api.php";
    - 8: 
    - 9: /**
    -10:  * This class provides some spezial SpsAPI methods
    -11:  * @author stubbfel
    -12:  * @since 20.06.2013
    -13:  */
    -14: class SpsApi extends Api {
    -15: 
    -16:     /**
    -17:      * Default-Constructor
    -18:      */
    -19:     public function __construct() {
    -20:         $this->sqlManager = new \database\SpsSqlManager();
    -21:         parent::__construct();
    -22:     }
    -23: 
    -24:     /**
    -25:      * Default-DeConstructor
    -26:      */
    -27:     public function __destruct() {
    -28:         parent::__destruct();
    -29:     }
    -30: 
    -31:     /**
    -32:      * Method stert a sps-query
    -33:      * @param array $queryArgs
    -34:      * @return array[num] [assoc]
    -35:      */
    -36:     public function sendSpsQuery($queryArgs = array()) {
    -37:         return $this->sqlManager->sendSpsQuery($queryArgs);
    -38:     }
    -39: 
    -40: }
    -41: 
    -42: ?>
    -43: 
    +
      1: <?php
    +  2: 
    +  3: namespace api;
    +  4: 
    +  5: include_once "../../global.inc.php";
    +  6: include_once PATH_DATABASE . "/SpsSqlManager.php";
    +  7: include_once PATH_UTILITTY . "/XmlManager.php";
    +  8: require_once PATH_API . "/Api.php";
    +  9: 
    + 10: /**
    + 11:  * This class provides some spezial SpsAPI methods
    + 12:  * @author stubbfel
    + 13:  * @since 20.06.2013
    + 14:  */
    + 15: class SpsApi extends Api {
    + 16: 
    + 17:     /**
    + 18:      * Route string for the alias paramter
    + 19:      * @var string
    + 20:      */
    + 21:     public static $routeParameterAlias = "/alias/:alias";
    + 22: 
    + 23:     /**
    + 24:      * Route string for the domain paramter
    + 25:      * @var string
    + 26:      */
    + 27:     public static $routeParameterDomain = "/domain/:domain";
    + 28: 
    + 29:     /**
    + 30:      * Route string for the Longitude paramter
    + 31:      * @var string
    + 32:      */
    + 33:     public static $routeParameterLongitude = "/longitude/:longitude";
    + 34: 
    + 35:     /**
    + 36:      * Route string for the latitude paramter
    + 37:      * @var string
    + 38:      */
    + 39:     public static $routeParameterLatitude = "/latitude/:latitude";
    + 40: 
    + 41:     /**
    + 42:      * Keyword for alias arguments
    + 43:      * @var string
    + 44:      */
    + 45:     public static $keyAlias = "alias";
    + 46: 
    + 47:     /**
    + 48:      * Keyword for domain arguments
    + 49:      * @var string
    + 50:      */
    + 51:     public static $keyDomain = "domain";
    + 52: 
    + 53:     /**
    + 54:      * Keyword for polygon arguments
    + 55:      * @var string
    + 56:      */
    + 57:     public static $keyPoly = "poly";
    + 58: 
    + 59:     /**
    + 60:      * Keyword for longitude arguments
    + 61:      * @var string
    + 62:      */
    + 63:     public static $keyLong = "longitude";
    + 64: 
    + 65:     /**
    + 66:      * Keyword for latitude arguments
    + 67:      * @var string
    + 68:      */
    + 69:     public static $keyLat = "latitude";
    + 70: 
    + 71:     /*
    + 72:      * Varible for the range of the searchpolygon
    + 73:      * @var float
    + 74:      */
    + 75:     private $range = 1;
    + 76: 
    + 77:     /*
    + 78:      * Varible for the fist chars of the string for a Polygon
    + 79:      * @var string
    + 80:      */
    + 81:     private $polyStartStr = "GeomFromText('Polygon((";
    + 82: 
    + 83:     /*
    + 84:      * Varible for the last chars of the string for a Polygon
    + 85:      * @var string
    + 86:      */
    + 87:     private $polyEndStr = "))'";
    + 88: 
    + 89:     /**
    + 90:      * maximum value of latitude
    + 91:      * @var float
    + 92:      */
    + 93:     private $maxLat = 180;
    + 94: 
    + 95:     /**
    + 96:      * minimum value of latitude
    + 97:      * @var float
    + 98:      */
    + 99:     private $minLat = -180;
    +100: 
    +101:     /**
    +102:      * maximum value of longitude
    +103:      * @var float
    +104:      */
    +105:     private $maxLong = 180;
    +106: 
    +107:     /**
    +108:      * minimum value of longitude
    +109:      * @var float
    +110:      */
    +111:     private $minLong = -180;
    +112: 
    +113:     /**
    +114:      * Default-Constructor
    +115:      */
    +116:     public function __construct() {
    +117:         $this->sqlManager = new \database\SpsSqlManager();
    +118:         parent::__construct();
    +119:     }
    +120: 
    +121:     /**
    +122:      * Default-DeConstructor
    +123:      */
    +124:     public function __destruct() {
    +125:         parent::__destruct();
    +126:     }
    +127: 
    +128:     /**
    +129:      * Method start a sps-query(alias)
    +130:      * @param array $queryArgs
    +131:      * @return querry result as xml
    +132:      */
    +133:     public function sendSpsAliasQuery($queryArgs) {
    +134:         $result = $this->sqlManager->sendSpsAliasQuery($queryArgs);
    +135:         return \utiliy\XmlManager::arrayToSpsXml($result);
    +136:     }
    +137: 
    +138:     /**
    +139:      * Method start a sps-query(Coordinates)
    +140:      * @param array $queryArgs
    +141:      * @return querry result as xml
    +142:      */
    +143:     public function sendSpsCoordinateQuery($queryArgs) {
    +144:         
    +145:          // check arguments of the query
    +146:         if (!array_key_exists(SpsApi::$keyLong, $queryArgs) || !array_key_exists(SpsApi::$keyLat, $queryArgs)) {
    +147:             return null;
    +148:         }
    +149:         $latitude = $queryArgs[SpsApi::$keyLat];
    +150:         $longitude = $queryArgs[SpsApi::$keyLong];
    +151: 
    +152:         if (!$this->validLatitude($latitude) || !$this->validLongitude($longitude)) {
    +153:             return null;
    +154:         }
    +155: 
    +156:         // build a request polygon
    +157:         $queryArgs[SpsApi::$keyPoly] = $this->createPolygon($latitude, $longitude, $this->range);
    +158:         
    +159:         // send querry
    +160:         $result = $this->sqlManager->sendSpsCoordinateQuery($queryArgs);
    +161:         return \utiliy\XmlManager::arrayToSpsXml($result);
    +162:     }
    +163: 
    +164:     /**
    +165:      * Method check if a string is a valid Longitude
    +166:      * @param string $string
    +167:      * @return bool
    +168:      */
    +169:     private function validLongitude($string) {
    +170:         $digitLessPoint = str_replace(".", "", $string);
    +171:         $digit = str_replace("-", "", $digitLessPoint);
    +172:         if (ctype_digit($digit)) {
    +173:             if ($string <= $this->maxLong && $string >= $this->minLong) {
    +174:                 return TRUE;
    +175:             }
    +176:         };
    +177:         return FALSE;
    +178:     }
    +179: 
    +180:     /**
    +181:      * Method check if a string is a valid Latitude
    +182:      * @param strinf $string
    +183:      * @return bool
    +184:      */
    +185:     private function validLatitude($string) {
    +186:         $digitLessPoint = str_replace(".", "", $string);
    +187:         $digit = str_replace("-", "", $digitLessPoint);
    +188:         if (ctype_digit($digit)) {
    +189:             if ($string <= $this->maxLat && $string >= $this->minLat) {
    +190:                 return TRUE;
    +191:             }
    +192:         };
    +193:         return FALSE;
    +194:     }
    +195: 
    +196:     /**
    +197:      * Method create a Polygon
    +198:      * @param float $latitude
    +199:      * @param float $longitude
    +200:      * @param float $range
    +201:      * @return string
    +202:      */
    +203:     private function createPolygon($latitude, $longitude, $range) {
    +204:         $minLat = $latitude - $range;
    +205:         $minLong = $longitude - $range;
    +206:         $maxLat = $latitude + $range;
    +207:         $maxLong = $longitude + $range;
    +208:         return $this->polyStartStr . "$minLat $minLong,$minLat $maxLong,$maxLat $maxLong,$maxLat $minLong,$minLat $minLong" . $this->polyEndStr;
    +209:     }
    +210: 
    +211: }
    +212: 
    +213: ?>
    +214: 
    @@ -97,33 +99,40 @@ 4: 5: /** 6: * This clas is an container for the DBConf - 7: */ - 8: class DBConfig { - 9: -10: /** -11: * Address of the sqlserver -12: */ -13: public static $sqlServer = "localhost"; -14: -15: /** -16: * name of the database -17: */ -18: public static $sqlDBName = "geoDB"; -19: -20: /** -21: * user of the database + 7: * + 8: * @author stubbfel + 9: * @since 20.06.2013 +10: */ +11: class DBConfig { +12: +13: /** +14: * Address of the sqlserver +15: * @var string +16: */ +17: public static $sqlServer = "localhost"; +18: +19: /** +20: * name of the database +21: * @var string 22: */ -23: public static $sqlDBUser = "geoDB"; +23: public static $sqlDBName = "geoDB"; 24: 25: /** -26: * password of the database -27: */ -28: public static $sqlDBUserPW = "VZrSAYvmcrntQ97b"; -29: -30: } -31: -32: ?> -33: +26: * user of the database +27: * @var string +28: */ +29: public static $sqlDBUser = "geoDB"; +30: +31: /** +32: * password of the database +33: * @var string +34: */ +35: public static $sqlDBUserPW = "VZrSAYvmcrntQ97b"; +36: +37: } +38: +39: ?> +40: @@ -48,6 +50,8 @@

    Classes

    @@ -92,51 +96,237 @@
    -
     1: <?php
    - 2: 
    - 3: namespace database;
    - 4: 
    - 5: include_once "../../global.inc.php";
    - 6: include_once PATH_DATABASE . "/SpsSqlManager.php";
    - 7: include_once PATH_DATABASE . "/SqlManager.php";
    - 8: 
    - 9: /**
    -10:  * Description of SpsSqlManager
    -11:  * 
    -12:  * @author stubbfel
    -13:  * @since 20.06.2013
    -14:  */
    -15: class SpsSqlManager extends SQLManager {
    -16: 
    -17:     /**
    -18:      * Default-Constructor
    -19:      */
    -20:     public function __construct() {
    -21:         parent::__construct();
    -22:     }
    -23: 
    -24:     /**
    -25:      * Default-DEConstructor
    -26:      */
    -27:     public function __destruct() {
    -28:         parent::__destruct();
    -29:     }
    -30: 
    -31:     /**
    -32:      * Methods send an query for the sps-service
    -33:      * @param array $queryArgs
    -34:      * @return array [num][assoc]
    -35:      */
    -36:     public function sendSpsQuery($queryArgs = array()) {
    -37:         // TODO Input validitaion
    -38:         $alias = $queryArgs["alias"];
    -39:         return $this->query("SELECT * FROM sps Where alias = \"$alias\"");
    -40:     }
    -41: 
    -42: }
    -43: 
    -44: ?>
    -45: 
    +
      1: <?php
    +  2: 
    +  3: namespace database;
    +  4: 
    +  5: include_once "../../global.inc.php";
    +  6: include_once PATH_UTILITTY . "/StringManager.php";
    +  7: require_once PATH_DATABASE . "/SqlManager.php";
    +  8: 
    +  9: /**
    + 10:  * Description of SpsSqlManager
    + 11:  * 
    + 12:  * @author stubbfel
    + 13:  * @since 20.06.2013
    + 14:  */
    + 15: class SpsSqlManager extends SQLManager {
    + 16: 
    + 17:     /**
    + 18:      * Fieldname of the placeID
    + 19:      * @var string
    + 20:      */
    + 21:     public static $placeId = "id";
    + 22: 
    + 23:     /**
    + 24:      * Fieldname of the parendId
    + 25:      * @var string
    + 26:      */
    + 27:     public static $parentId = "parent";
    + 28: 
    + 29:     /**
    + 30:      * String for the select part of the query
    + 31:      * @var string
    + 32:      */
    + 33:     private $selectTerm = "SELECT DISTINCT id, parent FROM sps WHERE ";
    + 34: 
    + 35:     /**
    + 36:      * String for the alias part of the query
    + 37:      * @var string
    + 38:      */
    + 39:     private $aliasTerm = "alias = ";
    + 40: 
    + 41:     /**
    + 42:      * String for the did part of the query
    + 43:      * @var string
    + 44:      */
    + 45:     private $domainTerm = "did = ";
    + 46: 
    + 47:     /**
    + 48:      * String for the dNamet part of the query
    + 49:      * @var string
    + 50:      */
    + 51:     private $domainNameTerm = "dName = ";
    + 52: 
    + 53:     /**
    + 54:      * first part of  intersect-function
    + 55:      * @var string
    + 56:      */
    + 57:     private $interSectTermStart = "Intersects(";
    + 58: 
    + 59:     /**
    + 60:      * last part of  intersect-function
    + 61:      * @var string
    + 62:      */
    + 63:     private $interSectTermEnd = "),plan)";
    + 64: 
    + 65:     /**
    + 66:      * first part of  GeomFromText('Polygon-function
    + 67:      * @var string
    + 68:      */
    + 69:     private $polyStartStr = "GeomFromText('Polygon((";
    + 70: 
    + 71:     /**
    + 72:      * last part of  GeomFromText('Polygon-function
    + 73:      * @var string
    + 74:      */
    + 75:     private $polyEndStr = "))'";
    + 76: 
    + 77:     /**
    + 78:      * maximium length of the value-string for an aliasname
    + 79:      * @var int
    + 80:      */
    + 81:     private $aliasMaxLenght = 32;
    + 82: 
    + 83:     /**
    + 84:      * maximium length of the value-string for a domainname
    + 85:      * @var int
    + 86:      */
    + 87:     private $domainMaxLenght = 32;
    + 88: 
    + 89:     /**
    + 90:      * Default-Constructor
    + 91:      */
    + 92:     public function __construct() {
    + 93:         parent::__construct();
    + 94:     }
    + 95: 
    + 96:     /**
    + 97:      * Default-DEConstructor
    + 98:      */
    + 99:     public function __destruct() {
    +100:         parent::__destruct();
    +101:     }
    +102: 
    +103:     /**
    +104:      * Methods send an query for the sps-service depends of alias
    +105:      * @param array $queryArgs
    +106:      * @return array [num][assoc]
    +107:      */
    +108:     public function sendSpsAliasQuery($queryArgs) {
    +109: 
    +110:         // check arguments of the query
    +111:         if (array_key_exists(\api\SpsApi::$keyAlias, $queryArgs)) {
    +112:             $alias = $queryArgs[\api\SpsApi::$keyAlias];
    +113:         } else {
    +114:             return null;
    +115:         }
    +116: 
    +117:         $domain = null;
    +118:         if (array_key_exists(\api\SpsApi::$keyDomain, $queryArgs)) {
    +119:             $domain = $queryArgs[\api\SpsApi::$keyDomain];
    +120:         }
    +121: 
    +122:         // build query string
    +123:         $query = $this->selectTerm;
    +124:         if ($this->validAliasString($alias)) {
    +125:             $query .= $this->aliasTerm . $this->quoteTerm . $alias . $this->quoteTerm . $this->addDomainTerm($domain);
    +126:         } else {
    +127:             return null;
    +128:         }
    +129: 
    +130:         // send query
    +131:         return $this->query($query);
    +132:     }
    +133: 
    +134:     /**
    +135:      * Methods send an query for the sps-service depends of coordinates
    +136:      * @param array $queryArgs
    +137:      * @return array [num][assoc]
    +138:      */
    +139:     public function sendSpsCoordinateQuery($queryArgs) {
    +140: 
    +141:         // check arguments of the query
    +142:         if (array_key_exists(\api\SpsApi::$keyPoly, $queryArgs)) {
    +143:             $poly = $queryArgs[\api\SpsApi::$keyPoly];
    +144:         } else {
    +145:             return null;
    +146:         }
    +147: 
    +148:         $domain = null;
    +149:         if (array_key_exists(\api\SpsApi::$keyDomain, $queryArgs)) {
    +150:             $domain = $queryArgs[\api\SpsApi::$keyDomain];
    +151:         }
    +152: 
    +153:         // build query string
    +154:         if ($this->validPolyString($poly)) {
    +155:             $query = $this->selectTerm . $this->interSectTermStart . $poly . $this->interSectTermEnd . $this->addDomainTerm($domain);
    +156:         } else {
    +157:             return null;
    +158:         }
    +159: 
    +160:         // send query
    +161:         return $this->query($query);
    +162:     }
    +163: 
    +164:     /**
    +165:      * Method create the correct domain part depends of $domain. If it is a number => did
    +166:      * otherwise => dName
    +167:      * @param string $domain
    +168:      * @return string
    +169:      */
    +170:     private function addDomainTerm($domain) {
    +171:         $result = null;
    +172:         if ($domain != null && $this->validDomainString($domain)) {
    +173:             if ($this->isDid($domain)) {
    +174:                 $result .= $this->andTerm . $this->domainTerm . $this->quoteTerm . $domain . $this->quoteTerm;
    +175:             } else {
    +176:                 $result .= $this->andTerm . $this->domainNameTerm . $this->quoteTerm . $domain . $this->quoteTerm;
    +177:             }
    +178:         }
    +179:         return $result;
    +180:     }
    +181: 
    +182:     /**
    +183:      * Method check if the input value for the alias is valid
    +184:      * @param string $alias
    +185:      * @return boolean
    +186:      */
    +187:     private function validAliasString($alias) {
    +188:         if (\utiliy\StringManager::validSQLString($alias) && ctype_alnum($alias) && strlen($alias) <= $this->aliasMaxLenght) {
    +189:             return TRUE;
    +190:         }
    +191:         return FALSE;
    +192:     }
    +193: 
    +194:     /**
    +195:      * Method check if the input value for the alias is valid
    +196:      * @param string $domain
    +197:      * @return boolean
    +198:      */
    +199:     private function validDomainString($domain) {
    +200:         if (\utiliy\StringManager::validSQLString($domain) && ctype_alnum($domain) && strlen($domain) <= $this->domainMaxLenght) {
    +201:             return TRUE;
    +202:         }
    +203:         return FALSE;
    +204:     }
    +205: 
    +206:     /**
    +207:      * Method check if the input value for the polygon is valid
    +208:      * @param string $poly
    +209:      * @return boolean
    +210:      */
    +211:     private function validPolyString($poly) {
    +212:         if (\utiliy\StringManager::validSQLString($poly) && \utiliy\StringManager::startsWith($poly, $this->polyStartStr) 
    +213:                 && \utiliy\StringManager::endsWith($poly, $this->polyEndStr)) {
    +214:             return TRUE;
    +215:         }
    +216:         return FALSE;
    +217:     }
    +218: 
    +219:     /**
    +220:      *  Method check if the ntring is a did
    +221:      * @param string $string
    +222:      * @return boolean
    +223:      */
    +224:     private function isDid($string) {
    +225:         return ctype_digit($string);
    +226:     }
    +227: 
    +228: }
    +229: 
    +230: ?>
    +231: 
    @@ -48,6 +50,8 @@

    Classes

    @@ -137,75 +141,103 @@ 43: private $link; 44: 45: /** - 46: * Default-Constructor - 47: */ - 48: public function __construct() { - 49: - 50: $this->serverAddress = \config\DBConfig::$sqlServer; - 51: $this->dbName = \config\DBConfig::$sqlDBName; - 52: $this->userName = \config\DBConfig::$sqlDBUser; - 53: $this->userPw = \config\DBConfig::$sqlDBUserPW; - 54: } - 55: - 56: /** - 57: * Default-DEConstructor - 58: */ - 59: public function __destruct() { - 60: $this->closeConnection(); - 61: $this->serverAddress = null; - 62: $this->dbName = null; - 63: $this->userName = null; - 64: $this->userPW = null; - 65: } - 66: - 67: /** - 68: * Method setup the connection to the Database - 69: */ - 70: public function connect() { - 71: $this->link = mysql_connect($this->serverAddress, $this->userName, $this->userPw); - 72: if (!$this->link) { - 73: exit("No Connection: " . mysql_error()); - 74: } - 75: $selected = mysql_select_db($this->dbName, $this->link); - 76: if (!$selected) { - 77: exit("No DB: " . mysql_error()); - 78: } - 79: } - 80: - 81: /** - 82: * Method close the connection - 83: */ - 84: public function closeConnection() { - 85: if ($this->link) { - 86: mysql_close($this->link); - 87: $this->link = null; - 88: } - 89: } - 90: - 91: /** - 92: * Method send a query to the Datebase and return the result - 93: * @param string $query - 94: * @return result[num][assoc] - 95: */ - 96: protected function query($query) { - 97: $mysqlResult = mysql_query($query, $this->link); - 98: if (!$mysqlResult) { - 99: exit("Query error: " . mysql_error()); -100: } -101: $rowNums = mysql_num_rows($mysqlResult); -102: $result = array(); -103: for ($i = 0; $i < $rowNums; $i++) { -104: $row = mysql_fetch_assoc($mysqlResult); -105: $result[$i] = $row; -106: } -107: mysql_free_result($mysqlResult); -108: return $result; -109: } -110: -111: } + 46: * String for an and-operrator + 47: * @var string + 48: */ + 49: protected $andTerm = " and "; + 50: + 51: /** + 52: * String for an or-operrator + 53: * @var string + 54: */ + 55: protected $orTerm = " or "; + 56: + 57: /** + 58: * String for quotes in a query + 59: * @var string + 60: */ + 61: protected $quoteTerm = "\""; + 62: + 63: /** + 64: * Default-Constructor + 65: */ + 66: public function __construct() { + 67: $this->serverAddress = \config\DBConfig::$sqlServer; + 68: $this->dbName = \config\DBConfig::$sqlDBName; + 69: $this->userName = \config\DBConfig::$sqlDBUser; + 70: $this->userPw = \config\DBConfig::$sqlDBUserPW; + 71: } + 72: + 73: /** + 74: * Default-DEConstructor + 75: */ + 76: public function __destruct() { + 77: + 78: // close connection + 79: $this->closeConnection(); + 80: + 81: // delete connection parameter + 82: unset($this->serverAddress); + 83: unset($this->dbName); + 84: unset($this->userName); + 85: unset($this->userPW); + 86: } + 87: + 88: /** + 89: * Method setup the connection to the Database + 90: */ + 91: public function connect() { + 92: $this->link = mysql_connect($this->serverAddress, $this->userName, $this->userPw); + 93: if (!$this->link) { + 94: exit("No Connection: " . mysql_error()); + 95: } + 96: $selected = mysql_select_db($this->dbName, $this->link); + 97: if (!$selected) { + 98: exit("No DB: " . mysql_error()); + 99: } +100: } +101: +102: /** +103: * Method close the connection +104: */ +105: public function closeConnection() { +106: if ($this->link) { +107: mysql_close($this->link); +108: unset($this->link); +109: $this->link = null; +110: } +111: } 112: -113: ?> -114: +113: /** +114: * Method send a query to the Datebase and return the result +115: * @param string $query +116: * @return result[num][assoc] +117: */ +118: protected function query($query) { +119: +120: // send error +121: $mysqlResult = mysql_query($query, $this->link); +122: if (!$mysqlResult) { +123: exit("Query error: " . mysql_error()); +124: } +125: +126: // fetch result +127: $rowNums = mysql_num_rows($mysqlResult); +128: $result = array(); +129: for ($i = 0; $i < $rowNums; $i++) { +130: $row = mysql_fetch_assoc($mysqlResult); +131: $result[$i] = $row; +132: } +133: +134: // call gc +135: mysql_free_result($mysqlResult); +136: +137: return $result; +138: } +139: } +140: +141: ?> +142: @@ -48,9 +50,13 @@

    Classes

    Interfaces

    @@ -304,6 +313,20 @@