for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the geo-api-library package.
*
* (c) 2020 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Library\GeoAPI\Model\Response;
use WBW\Library\GeoAPI\Model\AbstractResponse;
use WBW\Library\GeoAPI\Model\Commune;
/**
* Communes response.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Library\GeoAPI\Model\Response
class CommunesResponse extends AbstractResponse {
* Communes.
* @var Commune[]
private $communes;
* Constructor.
public function __construct() {
$this->setCommunes([]);
}
* Add a commune.
* @param Commune $commune The commune.
* @return CommunesResponse Returns this communes response.
public function addCommune(Commune $commune) {
$this->communes[] = $commune;
return $this;
* Get the communes.
* @return Commune[] Returns the communes.
public function getCommunes() {
return $this->communes;
* Set the communes.
* @param Commune[] $communes The communes.
protected function setCommunes(array $communes) {
$this->communes = $communes;