Lue dans les fichiers PHP du paquet au commit 1d2fac8fe4e9 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
EurlexSourceclassEU law, from the Publications Office's open access to Cellar, the repository behind EUR-Lex - no key:
9 methods · 2 constants
EurlexSourceFactoryclassEUR-Lex, from the Publications Office's open endpoint - no key.
5 options
Omnilex\Eurlex
EurlexSource class
final class EurlexSource extends HttpSource implements SearchInterface, TextReaderInterface, ArticleReaderInterface, DecisionReaderInterface, CitationsInterface, RecentInterface EurlexSource.php:49
EU law, from the Publications Office's open access to Cellar, the repository behind EUR-Lex - no key:
- its SPARQL endpoint (publications.europa.eu/webapi/rdf/sparql), for the metadata: titles, dates, whether an act is in force, its consolidated versions, the links between acts and judgments;
- its resources by CELEX number, with content negotiation (publications.europa.eu/resource/celex/32016R0679, Accept: application/xhtml+xml, Accept-Language: fra), for the texts.
An act is read in the consolidated version that was the state of the law on the day asked for; before its first consolidation, as published in the Official Journal. Consolidated versions are documentary: only the Official Journal is authentic.
const SPARQL_URI = 'https://publications.europa.eu/webapi/rdf/sparql'const RESOURCE_URI = 'https://publications.europa.eu/resource/'
EurlexSource::__construct()
public function __construct(HttpClientInterface $http, string $language = 'fr', readonly bool $content = true, string $sparqlUri = self::SPARQL_URI, readonly string $resourceUri = self::RESOURCE_URI, array $headers = [], float $throttle = 0.5)$languageISO 639-1: the language of the titles, labels and texts ("fr")
$contentwhether text() and decision() also fetch the text itself (one more call, up to a few megabytes)
EurlexSource::getName()
public function getName(): stringEurlexSource::capabilities()
public function capabilities(): CapabilitiesEurlexSource::text()
public function text(Identifier|string $id, ?\DateTimeInterface $at = null): ?TextEurlexSource::article()
public function article(Identifier|string $id, ?string $number = null, ?\DateTimeInterface $at = null): ?ArticleEurlexSource::decision()
public function decision(Identifier|string $id): ?DecisionEurlexSource::citations()
public function citations(Identifier|string $id, int $limit = 100): arrayEurlexSource::search()
public function search(Query $query): ResultsEurlexSource::recent()
public function recent(\DateTimeInterface $since, ?Query $query = null): ResultsEurlexSourceFactory class
final class EurlexSourceFactory extends SourceFactory EurlexSourceFactory.php:20
EUR-Lex, from the Publications Office's open endpoint - no key.
options: language: fr # ISO 639-1: titles, labels and texts content: true # text() and decision() also fetch the text (one more call) throttle: 0.5 # seconds between two calls base_uri: 'https://publications.europa.eu/webapi/rdf/sparql' resource_uri: 'https://publications.europa.eu/resource/'
Options
| Option | Default | |
|---|---|---|
language | 'fr' | |
content | true | |
throttle | 0.5 | |
base_uri | EurlexSource::SPARQL_URI | |
resource_uri | EurlexSource::RESOURCE_URI |