Download the PHP package kraenzle-ritter/entity-relations without Composer
On this page you can find all versions of the php package kraenzle-ritter/entity-relations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kraenzle-ritter/entity-relations
More information about kraenzle-ritter/entity-relations
Files in kraenzle-ritter/entity-relations
Download kraenzle-ritter/entity-relations
More information about kraenzle-ritter/entity-relations
Files in kraenzle-ritter/entity-relations
Vendor kraenzle-ritter
Package entity-relations
Short Description Typed relations and hierarchies between Eloquent entities (keywords, actors, places, records), stored in one polymorphic table. Configurable relation types with inverse, symmetric and hierarchical flags, allowed entity pairs, polyhierarchy with a primary parent, cycle checks and recursive queries. Consumed by Anton.
License MIT
Package entity-relations
Short Description Typed relations and hierarchies between Eloquent entities (keywords, actors, places, records), stored in one polymorphic table. Configurable relation types with inverse, symmetric and hierarchical flags, allowed entity pairs, polyhierarchy with a primary parent, cycle checks and recursive queries. Consumed by Anton.
License MIT
Please rate this library. Is it a good library?
Informations about the package entity-relations
kraenzle-ritter/entity-relations
Typed relations and hierarchies between Eloquent entities, stored in one polymorphic table (relations). Built for Anton (roadmap issue #706); meant to serve kb later.
Scope
- Relation types in configuration (
config/entity-relations.php): inverse name, symmetric, hierarchical, temporal, allowed entity pairs (actor:place,page:*), labels per locale, SKOS and RiC-O mapping. - Canonical storage. A relation is stored once, under its canonical name. Writing it under the inverse name swaps the ends; symmetric relations are read from both ends.
- Polyhierarchy with a primary parent. Hierarchical types run child → parent. An entity may have several parents; one edge per type is primary and decides the place in the tree, the others show as a reference. The first parent becomes primary; when it goes, the next one takes over.
- Cycle check on writing hierarchical relations.
- Recursive queries (
WITH RECURSIVE, MySQL 8, MariaDB 10.2+, SQLite): ancestors, descendants (e.g. search including narrower terms), primary path (breadcrumb), roots, children with primary flag. - Compatible with existing data. Rows stored in the opposite direction or under the inverse name (as older imports did) are read correctly; mirror rows stored for both directions appear once and are deleted together. Unknown names are shown as stored.
- Gate. Whether an entity type has relations switched on is asked through
Contracts\Gate. The default readsentity-relations.enabled(empty); a host binds its own, e.g. per-tenant settings. The manager reads and writes regardless, so imports keep their data.
Not yet here: user interface (Livewire), SKOS schemes, SKOS import and export, RiC-O export.
Installation
The migration is additive: it creates relations where missing and adds nullable is_primary, position, date_text, date_start, date_end plus two indexes.
Usage
Tests
All versions of entity-relations with dependencies
PHP Build Version
Package Version
The package kraenzle-ritter/entity-relations contains the following files
Loading the files please wait ...