Skip to main content

Overview

Articles are the primary legal content of each framework. Every article belongs to exactly one framework, identified by its slug. Use $client->articles to list, fetch, and navigate them.

Methods

list()

Returns a page of article summaries for the given framework.
Parameters
ParameterTypeDefaultDescription
$frameworkSlugstringrequiredFramework slug, e.g. 'gdpr'
$pageint|nullnullPage number
$perPageint|nullnullItems per page (1–100)
Returns Page<ArticleSummary>

get()

Fetch the full content of a single article, including all paragraphs.
Parameters
ParameterTypeDescription
$frameworkSlugstringFramework slug
$articleNumberint|stringArticle number within the framework
Returns Article
Fetch articles related to a given article.
Returns Page<ArticleSummary>

iter()

Iterate over all articles in a framework across all pages.
Returns \Generator<ArticleSummary>

Models

ArticleSummary

Returned by list(), related(), and iter().
FieldTypeDescription
idintInternal numeric ID
frameworkSlugstringParent framework slug
articleNumberstringArticle number within the framework
titlestringArticle heading
positionintOrdering position in the framework
paragraphCountintNumber of paragraphs
tagsTag[]Tags applied to this article

Article

Returned by get(). Extends ArticleSummary with:
FieldTypeDescription
contentstringFull plain-text content of the article
paragraphsArticleParagraph[]Ordered list of paragraph objects

ArticleParagraph

FieldTypeDescription
paragraphRefstringLabel, e.g. '1', '2a', 'intro'
contentstringParagraph text
positionintOrdering position within the article

Examples

Print every GDPR article

Fetch a specific article and display paragraphs

Collect all articles into an array for fast lookup

Use iter() when you need every article. Use list() when you only need one page or want to control pagination yourself.