PHP code example of willdurand / propel-geocodable-behavior
1. Go to this page and download the library: Download willdurand/propel-geocodable-behavior library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
willdurand / propel-geocodable-behavior example snippets
php
class MyObject extends BaseMyObject
{
// ...
/**
* {@inheritdoc}
*/
public function geocode()
{
if (null !== $result = parent::geocode()) {
if ($city = $result->getCity()) {
$this->setCity($city);
}
}
return $result;
}
}