urban-brussels/brussels-permits 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

urban-brussels/brussels-permits

最新稳定版本:2.0.0

Composer 安装命令:

composer require urban-brussels/brussels-permits

包简介

PHP wrapper for Nova API, using DTO. Nova is a shared IT platform of the Brussels-Capital Region dedicated to the file management of planning permits, land division permits and environmental licences.

README 文档

README

A PHP library to interact with the Urban Brussels Planning Permits WFS API (Nova). This library allows you to query planning permits (PU) and environmental permits (PE), filter them by location, date, or status, and retrieve detailed information.

composer require urban-brussels/brussels-permits

Configuration

If you are using Symfony, you can configure the service in your services.yaml to enable autowiring:

services:
    UrbanBrussels\BrusselsPermits\Service\PermitMapper: ~
    UrbanBrussels\WfsClient\WfsClient:
        arguments:
            $wfsUrl: 'https://geoservices-others.irisnet.be/geoserver/Nova/ows'

    UrbanBrussels\BrusselsPermits\PermitsClient:
        autowire: true
        autoconfigure: true

If you are using this library in a standalone PHP project, you need to instantiate the client manually:

use Symfony\Component\HttpClient\HttpClient;
use UrbanBrussels\BrusselsPermits\PermitsClient;
use UrbanBrussels\BrusselsPermits\Service\PermitMapper;
use UrbanBrussels\WfsClient\WfsClient;

$httpClient = HttpClient::create();
$wfsClient = new WfsClient($httpClient, 'https://geoservices-others.irisnet.be/geoserver/Nova/ows');
$mapper = new PermitMapper();

$client = new PermitsClient($wfsClient, $mapper);

Usage

Version 2.0 introduces PermitsClient, a fluent interface for building queries.

Basic Query

To fetch permits, you must first select the type using from() (PermitType::PU for Urban Planning, PermitType::PE for Environmental), apply filters, and finally call get().

use UrbanBrussels\BrusselsPermits\Model\PermitType;

$permits = $client
->from(PermitType::PU)
->filterByReference('04/PFD/169999')
->get();

foreach ($permits as $permit) {
echo $permit->novaReference; // e.g. 04/PFD/169999
echo $permit->address;       // e.g. Rue de la Loi 155, 1040 Bruxelles
}

Migration from 1.x

Version 2.0 introduces breaking changes:

  1. WFSQueryService is deprecated. You should now use PermitsClient.
  2. The query logic is now fluent (chained methods) instead of passing large arrays of conditions.
  3. The Query service helper is also deprecated.

统计信息

  • 总下载量: 398
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固