Files
contao-leaflet-maps/src/Netzmacht/Contao/Leaflet/Mapper/Mapper.php

39 lines
945 B
PHP
Raw Normal View History

2014-12-29 12:17:40 +01:00
<?php
/**
* @package dev
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2014 netzmacht creative David Molineus
* @license LGPL 3.0
* @filesource
*
*/
namespace Netzmacht\Contao\Leaflet\Mapper;
use Netzmacht\LeafletPHP\Definition;
2015-01-06 14:55:53 +01:00
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
2014-12-29 12:17:40 +01:00
interface Mapper
{
/**
* Map model to the definition.
*
2015-01-06 14:55:53 +01:00
* @param \Model $model The model being built.
* @param DefinitionMapper $mapper The definition builder.
* @param LatLngBounds $bounds Optional bounds where elements should be in.
2014-12-29 12:17:40 +01:00
*
* @return Definition
*/
2015-01-06 14:55:53 +01:00
public function handle(\Model $model, DefinitionMapper $mapper, LatLngBounds $bounds = null);
2014-12-29 12:17:40 +01:00
/**
2015-01-06 14:55:53 +01:00
* Check if mapper is responsible for the model.
2014-12-29 12:17:40 +01:00
*
* @param \Model $model The model being build.
*
* @return bool
*/
public function match(\Model $model);
}