Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Frameworks represent EU regulations such as GDPR, CRA, NIS2, and the AI Act. Use $client->frameworks to list and fetch them.

Methods

list()

Returns a page of all available frameworks.
$page = $client->frameworks->list();

printf("Found %d frameworks\n", $page->meta->total);
foreach ($page->data as $fw) {
    printf("  %-12s %s\n", $fw->slug, $fw->name);
}
Returns Page<FrameworkSummary>

get()

Fetch a single framework by slug, including detailed counts.
$cra = $client->frameworks->get('cra');

echo $cra->name . "\n";               // Cyber Resilience Act
echo $cra->celexNumber . "\n";        // 32024R2847
echo $cra->articleCount . " articles\n";
Parameters
ParameterTypeDescription
$slugstringFramework slug, e.g. 'gdpr'
Returns Framework

iter()

Iterate over all frameworks across all pages.
foreach ($client->frameworks->iter() as $fw) {
    echo $fw->slug . ': ' . $fw->name . "\n";
}
Returns \Generator<FrameworkSummary>

Models

FrameworkSummary

Returned by list() and iter().
FieldTypeDescription
idintInternal numeric ID
slugstringURL-safe identifier, e.g. 'cra'
namestringFull framework name
shortNamestringShort name, e.g. 'CRA'
celexNumberstringEUR-Lex CELEX identifier
descriptionstring|nullBrief description
isActiveboolWhether data is actively maintained
statusstring'active', 'draft', or 'superseded'
articleCountintNumber of synced articles
recitalCountintNumber of synced recitals
createdAtstringISO 8601 creation timestamp

Framework

Returned by get(). Extends FrameworkSummary with:
FieldTypeDescription
eurLexUrlstringLink to the official EUR-Lex page
requirementCountintNumber of extracted requirements
annexCountintNumber of annexes
tagCountintNumber of associated tags
coveragearray|nullCoverage statistics

Examples

List all active frameworks

foreach ($client->frameworks->iter() as $fw) {
    if ($fw->isActive) {
        printf("%-12s %s (%d articles)\n", $fw->slug, $fw->name, $fw->articleCount);
    }
}

Find frameworks with full article coverage

$page = $client->frameworks->list();

foreach ($page->data as $fw) {
    if ($fw->expectedArticles > 0 && $fw->articleCount >= $fw->expectedArticles) {
        echo $fw->name . " — fully synced\n";
    }
}