Download the PHP package citomni/danish-public-sector-data without Composer

On this page you can find all versions of the php package citomni/danish-public-sector-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package danish-public-sector-data

Danish Public Sector Data

Reusable CitOmni clients for authoritative data services provided by the Danish public sector.

Package

citomni/danish-public-sector-data

Repository: https://github.com/citomni/danish-public-sector-data

citomni/danish-public-sector-data is a CitOmni provider package for PHP 8.5+. It exposes small, normalized CitOmni services while keeping upstream API protocols, authentication details, and source-specific data models inside the provider.

The initial implementation supports non-access-restricted company data from the Danish Central Business Register (CVR) through Datafordeler GraphQL.

Requirements

Install

Enable the infrastructure provider before this provider in the host app:

Datafordeler API key

Store the API key in the normal app-local CitOmni secret store. Do not put the credential in application configuration, templates, JavaScript, or version control.

The active file is selected by CITOMNI_ENVIRONMENT, for example var/secrets/app.secret.dev.php during local development.

Credential safety

Datafordeleren authenticates API-key requests with the key in the request URL. The internal Datafordeler client reuses the shared CitOmni curl service and marks apiKey through sensitive_query_keys. The real value is preserved for the outbound request, while URLs exposed through Curl metadata, logs, and exceptions are redacted. Raw transport metadata is not returned by the public CVR service.

CVR company lookup

The public CVR service intentionally returns a normalized package-owned array rather than Datafordeler-specific GraphQL relation names.

Result shape:

getCompany() requires exactly eight CVR digits and returns null when the upstream query returns no company node. Integration failures throw exceptions from CitOmni\DanishPublicSectorData\Exception. The address.formatted value is built locally from the normalized CVR address fields; Datafordeler's upstream Adresse value is a DAR address reference rather than formatted display text.

address continues to prefer the registered location address and falls back to the postal address for backwards-compatible lookup behavior. postalAddress exposes the postal address explicitly when CVR supplies one. Industry sequence 0 is normalized as the primary industry; sequences 1 through 3 are returned as secondary industries.

The normalized getCompany() contract intentionally remains limited to fields exposed by the selected Datafordeler GraphQL contract. Source-specific payloads are not part of getCompany() and must not leak into application persistence contracts.

The current default uses Datafordeler flexibleCurrent/v3. Host applications can override the endpoint selection through the normal CitOmni configuration flow:

A service-version change that also changes the GraphQL schema may require a package update; overriding the version does not make incompatible schemas compatible.

VAT registration lookup

The provider also exposes vatRegistration. Its current implementation checks one exact CVR/SE number through SKAT's anonymous public VAT-number web lookup:

The normalized result contains the queried number, the decisive current registration state, the displayed verification date when available, and skat.dk as source. The web transport is deliberately isolated because the public SKAT page is not a documented API contract. No CAPTCHA, login, or access control is bypassed. The exact queried CVR/SE number is retained because a legal CVR number may use separate administrative SE numbers for VAT registration.

The parser smoke test covers the observed CVR/SE search controls plus decisive positive and negative result wording without making a live network request:

Internal Datafordeler client

Datafordeler authentication and GraphQL transport are internal package concerns. Support\DatafordelerClient is instantiated by public package services as needed and is deliberately not registered in the host application's service map.

The first release supports API-key authentication for non-access-restricted data. OAuth and access-restricted datasets are deliberately outside the initial scope.

Architecture

The provider keeps the boundaries intentionally small:

New public-sector sources should be added only when there is a concrete consumer. Do not force unrelated REST, GraphQL, geospatial, or file-download APIs behind one artificial generic abstraction.

Configuration and services

The provider contributes two shared service IDs:

Internal transport helpers are not registered as host-app services.

Package-owned defaults live under danish_public_sector_data in src/Boot/Registry.php and may be overridden by the host app through normal CitOmni configuration precedence.

Data and licensing

The package source code is released under the MIT License. Data retrieved from public-sector services remains subject to the terms, licences, access conditions, and other rules of the respective data provider. This package does not grant any rights to third-party or public-sector data.

Coding conventions

License

citomni/danish-public-sector-data is released under the MIT License. See NOTICE.

Trademarks

See TRADEMARKS.md for the CitOmni trademark notice applicable to this package.


All versions of danish-public-sector-data with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
citomni/kernel Version ^1.0
citomni/infrastructure Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package citomni/danish-public-sector-data contains the following files

Loading the files please wait ...