PackageTrack
Sign in Get early access

sweetrdf/rdf-interface

A common RDF interface for PHP RDF libraries.

3.2.0 1.4M downloads/mo #3116 most downloaded on Packagist sweetrdf/rdfInterface

What this package is like to depend on

Last release 1 years ago

28 Apr 2025

Release timing varies

gaps range from 8 days to 12 months

Rarely documented

notes for 1 of 26 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

34 releases · first in 2021

0 releases in the last 12 months

see the full history below

Release timeline

33 releases · Jan 2021 to Apr 2025
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 34
  1. 3.2.0 28 Apr 2025

    Nothing published for this version

  2. 3.1.0 24 Apr 2025

    Nothing published for this version

  3. 3.0.0 22 Apr 2025

    Nothing published for this version

  4. 2.1.0 22 Nov 2024

    Nothing published for this version

  5. 2.0.0 09 Feb 2024
    Release notes

    Backward-incompatible changes

    • rdfInterface\DatasetCompareInterface, rdfInterface\DatasetMapReduceInterface and rdfInterface\DatasetQuadPartsInterface merged into rdfInterface\DatasetInterface.
    • rdfInterface\DatasetInterface
      • copyExcept($filter) does not accept null as the $filter. If you want to copy all quads, use the copy() method.
      • delete($filter) does not accept null as the $filter. If you want an empty dataset, just create a new one.
      • offsetExists($offset), offsetGet($offset), offsetSet($offset, $value) and offsetUnset($offset) method now must throw a newly introduced rdfInterface\MultipleQuadsMatchedException if the offset matches multiple quads.

    New features

    • rdfInterface\DatasetNodeInterface interface added for a node-oriented RDF graph operations.
      It extends the rdfInterface\DatasetInterface, just methods are (generally) applied only to quads with a subject matching a given rdfInterface\TermInterface term.
    • rdfInterface\TermIteratorInterface extended
      • contains(rdfInterface\TermCompareInterface $term): bool method added allowing to perform in_array-like check.
      • getValues(): array<string> method added.
      • intersect($terms): rdfInterface\TermIteratorInterface method added.
      • skip($terms): rdfInterface\TermIteratorInterface method added.
    • rdfInterface\DatasetNode
      • Static method factory() added as a replacement for the rdfInterface\DatasetNode::__construct(). This follows the convention not to enforce constructor signatures.
      • Getter shorthands added (a reference implementation is provided by the rdfHelpers\DatasetGettersTrait class of the sweetrdf/rdf-helpers package):
        • getSubject(), getPredicate(), getObject(), getGraph() returning an rdfInterface\TermInterface | null
        • getSubjectValue(), getPredicateValue(), getObjectValue(), getGraphValue() returning mixed | null
    • rdfInterface\QuadNoSubjectInterface added for convenient adding quads to the rdfInterface\DatasetNode.
    • rdfInterface\DataFactory
      • quadNoSubject($predicate, $object, $graph): rdfInterface\QuadNoSubjectInterface method added.
    • rdfInterface\MultipleQuadsMatchedException exception added to make it possible to easily distinguish between standard PHP array access errors (the \UnexpectedValueException when an offset does not exist) and rdfInterface-specific "multiple quads matched" error.
    • rdfInterface\QuadInterface::getValue() must throw the \BadMethodCall exception.

    Relaxed definitions

    • rdfInterface\BlankNodeInterface, rdfInterface\NamedNodeInterface, rdfInterface\LiteralInterface and rdfInterface\QuadInterface constructor definition dropped. These constructors are anyway not meant to be called directly as terms should be instantiated trough the rdfInterface\DataFactoryInterface class so it makes no sense to enforce their signatures.
    • rdfInterface\DatasetNode:
      • __construct() method dropped. This follows the convention not to enforce constructor signatures. A static factory() method signature is defined instead.
      • add() accepts QuadInterface|\Traversable<rdfInterface\QuadInterface>|array<rdfInterface\QuadInterface> (instead of rdfInterface\QuadInterface|rdfInterface\QuadIteratorInterface|rdfInterface\QuadIteratorAggregateInterface).
      • forEach($filter) accepts null as a $filter.
    • rdfInterface\SerializerInterface
      • serialize() and serializeStream() accept \Traversable<QuadInterface>|array<QuadInterface> (instead of rdfInterface\QuadIteratorInterface|rdfInterface\QuadIteratorAggregateInterface).

    Minor changes

    • rdfInterface\TermInterface now extends rdfInterface\TermCompareInterface instead of defining equals() and __toString() methods explicitly.
    • rdfInterface\TermCompareInterface, rdfInterface\QuadCompareInterface and rdfInterface\DatasetInterface extend Stringable instead of declaring __toString() explicitly.
    • rdfInterface\QuadCompareInterface methods: getSubject(), getPredicate(), getObject() and getGraph() return type is rdfInterface\TermCompareInterface | null (instead of rdfInterface\TermInterface | rdfInterface\TermCompareInterface | null).
    Open source →
  6. 2.0.0-RC7 no date pre-release
    Release notes

    DatasetNodeInterface: few typos fixed

    Open source →
  7. 2.0.0-RC6 01 Sep 2023 pre-release
    Release notes
    • add description of the __toString() behavior
    • equals() must take TermInterface as a parameter because without the
      getValue() method being available it's impossible to check the terms
      equality
    Open source →
  8. 2.0.0-RC5 31 Aug 2023 pre-release
    Release notes

    SerializerInterface::serialize() and serializeStream() accept any ite…

    Open source →
  9. 2.0.0-RC4 31 Aug 2023 pre-release
    Release notes

    DatasetInterface: get*Value() return mixed as TermInterface::getValue…

    Open source →
  10. 2.0.0-RC3 29 Aug 2023 pre-release
    Release notes

    TermIteratorInterface: missing "use" statement added

    Open source →
  11. 2.0.0-RC2 27 Jul 2023 pre-release

    Nothing published for this version

  12. 2.0.0-RC1 26 Jul 2023 pre-release

    Nothing published for this version

  13. 1.0.1 21 Jul 2023

    Nothing published for this version

  14. 1.0.0 01 Nov 2022

    Nothing published for this version

  15. 1.0.0-RC1 24 Oct 2022 pre-release

    Nothing published for this version

  16. 0.11.0 25 May 2022

    Nothing published for this version

  17. 0.10.1 26 May 2021

    Nothing published for this version

  18. 0.10.0 13 Apr 2021

    Nothing published for this version

  19. 0.9.0 03 Apr 2021

    Nothing published for this version

  20. 0.8.1 23 Mar 2021

    Nothing published for this version

  21. 0.8.0 23 Mar 2021

    Nothing published for this version

  22. 0.7.1 21 Mar 2021

    Nothing published for this version

  23. 0.7.0 21 Mar 2021

    Nothing published for this version

  24. 0.6.0 19 Mar 2021

    Nothing published for this version

  25. 0.5.1 16 Mar 2021

    Nothing published for this version

  26. 0.5.0 16 Mar 2021

    Nothing published for this version

  27. 0.4.5 16 Mar 2021

    Nothing published for this version

  28. 0.4.4 16 Mar 2021

    Nothing published for this version

  29. 0.4.3 16 Mar 2021

    Nothing published for this version

  30. 0.4.2 16 Mar 2021

    Nothing published for this version

  31. 0.3.1 14 Mar 2021

    Nothing published for this version

  32. 0.3.0 14 Mar 2021

    Nothing published for this version

  33. 0.2.0 28 Jan 2021

    Nothing published for this version

  34. 0.1.0 16 Jan 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive