Make mapper interface independent from Contao models.

This commit is contained in:
David Molineus
2015-01-08 22:56:23 +01:00
parent 46d261a7a1
commit 082ba4f568
4 changed files with 14 additions and 10 deletions

View File

@@ -15,7 +15,9 @@ use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
/**
* Class AbstractMapper.
* Class AbstractMapper is made for mapping Contao models to the definition.
*
* For custom sources besides Contao models use your own implementation of the mapper interface.
*
* @package Netzmacht\Contao\Leaflet\Mapper
*/
@@ -149,7 +151,7 @@ abstract class AbstractMapper implements Mapper
/**
* {@inheritdoc}
*/
public function handle(\Model $model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
public function handle($model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
{
$definition = $this->createInstance($model, $mapper, $bounds);
@@ -163,7 +165,7 @@ abstract class AbstractMapper implements Mapper
/**
* {@inheritdoc}
*/
public function match(\Model $model)
public function match($model, LatLngBounds $bounds = null)
{
$modelClass = static::$modelClass;