Download the PHP package phil/geolocation-bundle without Composer
On this page you can find all versions of the php package phil/geolocation-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/geolocation-bundle
More information about phil/geolocation-bundle
Files in phil/geolocation-bundle
Package geolocation-bundle
Short Description A Symfony2 Bundle to handle geographic location. Add geolocation to your entities. Add address entities. Add user geo location. Add doctrine functions for calculating geographical distances in your project.
License MIT
Homepage https://github.com/ph-il/geolocation-bundle
Informations about the package geolocation-bundle
Phil GeolocationBundle
NOT UPDATED... Working on the new version for Symfony 3. Divided in different Bundles
A Symfony2 Bundle to handle geographic location. Add geolocation to your entities. Add address entities. Add user geo location. Add doctrine functions for calculating geographical distances in your project.
1 Installation
1.1 Composer
or
1.2 Enable the bundle
1.3 Register the Doctrine functions you need
You need to manually register the Doctrine functions you want to use. See http://symfony.com/doc/current/cookbook/doctrine/custom_dql_functions.html for details.
1.4 Update Your schema
doctrine:schema:update
2 Usage
2.1 Entities
You can create a relation to one of the Entities, or you can use one of the traits. You can use interfaces, you need AddressInterface and GeocodeInterface. AddressableEntity and GeocodableEntity are the traits for those interface.
Address is independent of any other entities.
2.2 Formatter
php
use Phil\GeolocationBundle\Service\FormatterService;
...
$formatted = $this->get("phil.geolocation.address.formatter")->format($address, FormatterService::FLAG_NOBR);
sh
in a shell
php app/console doctrine:fixtures:load --append --fixtures="src/MyCompany/MyBundle/DataFixtures/ORM"
sf doctrine:fixtures:load --append --fixtures="src/Phil/TestBundle/DataFixtures/ORM"
# 3 Thanks #
Some idea are taken from
[padam87/address-bundle](https://packagist.org/packages/padam87/address-bundle)
[craue/geo-bundle](https://github.com/craue/CraueGeoBundle)
# 4 TODO #
There is a lot to do :
* Finish all testing
* More documentations
* Clean Up Code
* All all require Entities for Geolocation
Fill free to send some corrections and suggestions.
All versions of geolocation-bundle with dependencies
symfony/symfony Version ~2.4
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
twig/extensions Version ~1.0
sensio/framework-extra-bundle Version ~3.0
willdurand/geocoder Version ~2.4
willdurand/geocoder-bundle Version ~3.0
league/geotools Version ~0.3
guzzle/guzzle Version 3.*
doctrine/doctrine-fixtures-bundle Version ~2.2
stof/doctrine-extensions-bundle Version ~1.1