default services conflit ?
This commit is contained in:
36
old.vendor/willdurand/geocoder/Provider/AbstractProvider.php
Normal file
36
old.vendor/willdurand/geocoder/Provider/AbstractProvider.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Geocoder package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Geocoder\Provider;
|
||||
|
||||
use Geocoder\Location;
|
||||
use Geocoder\Model\Address;
|
||||
|
||||
/**
|
||||
* @author William Durand <william.durand1@gmail.com>
|
||||
*/
|
||||
abstract class AbstractProvider implements Provider
|
||||
{
|
||||
/**
|
||||
* Returns the results for the 'localhost' special case.
|
||||
*
|
||||
* @return Location
|
||||
*/
|
||||
protected function getLocationForLocalhost(): Location
|
||||
{
|
||||
return Address::createFromArray([
|
||||
'providedBy' => $this->getName(),
|
||||
'locality' => 'localhost',
|
||||
'country' => 'localhost',
|
||||
]);
|
||||
}
|
||||
}
|
51
old.vendor/willdurand/geocoder/Provider/Provider.php
Normal file
51
old.vendor/willdurand/geocoder/Provider/Provider.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Geocoder package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Geocoder\Provider;
|
||||
|
||||
use Geocoder\Collection;
|
||||
use Geocoder\Query\GeocodeQuery;
|
||||
use Geocoder\Query\ReverseQuery;
|
||||
|
||||
/**
|
||||
* Providers MUST always be stateless and immutable.
|
||||
*
|
||||
* @author William Durand <william.durand1@gmail.com>
|
||||
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||
*/
|
||||
interface Provider
|
||||
{
|
||||
/**
|
||||
* @param GeocodeQuery $query
|
||||
*
|
||||
* @return Collection
|
||||
*
|
||||
* @throws \Geocoder\Exception\Exception
|
||||
*/
|
||||
public function geocodeQuery(GeocodeQuery $query): Collection;
|
||||
|
||||
/**
|
||||
* @param ReverseQuery $query
|
||||
*
|
||||
* @return Collection
|
||||
*
|
||||
* @throws \Geocoder\Exception\Exception
|
||||
*/
|
||||
public function reverseQuery(ReverseQuery $query): Collection;
|
||||
|
||||
/**
|
||||
* Returns the provider's name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string;
|
||||
}
|
Reference in New Issue
Block a user